mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 09:47:46 +05:30
PSR fixes
This commit is contained in:
parent
58adefa7d0
commit
b9cedc8b93
@ -43,7 +43,7 @@ abstract class AbstractTokenType
|
||||
|
||||
/**
|
||||
* Determine the access token in the authorization header
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* @return string
|
||||
*/
|
||||
abstract public function determineAccessTokenInHeader(Request $request);
|
||||
|
@ -41,6 +41,7 @@ class Bearer extends AbstractTokenType implements TokenTypeInterface
|
||||
{
|
||||
$header = $request->headers->get('Authorization');
|
||||
$accessToken = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header));
|
||||
|
||||
return ($accessToken === 'Bearer') ? '' : $accessToken;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user