mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-03 18:51:53 +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
|
* Determine the access token in the authorization header
|
||||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
abstract public function determineAccessTokenInHeader(Request $request);
|
abstract public function determineAccessTokenInHeader(Request $request);
|
||||||
|
@ -41,6 +41,7 @@ class Bearer extends AbstractTokenType implements TokenTypeInterface
|
|||||||
{
|
{
|
||||||
$header = $request->headers->get('Authorization');
|
$header = $request->headers->get('Authorization');
|
||||||
$accessToken = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header));
|
$accessToken = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header));
|
||||||
|
|
||||||
return ($accessToken === 'Bearer') ? '' : $accessToken;
|
return ($accessToken === 'Bearer') ? '' : $accessToken;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user