mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-29 16:30:44 +05:30
Fix broken code
This commit is contained in:
parent
3365f3d733
commit
d635b3484b
@ -69,7 +69,9 @@ class BearerTokenResponse extends AbstractResponseType
|
|||||||
*/
|
*/
|
||||||
public function validateAccessToken(ServerRequestInterface $request)
|
public function validateAccessToken(ServerRequestInterface $request)
|
||||||
{
|
{
|
||||||
$request = parent::validateAccessToken($request);
|
if ($request->hasHeader('authorization') === false) {
|
||||||
|
throw OAuthServerException::accessDenied('Missing "Authorization" header');
|
||||||
|
}
|
||||||
|
|
||||||
$header = $request->getHeader('authorization');
|
$header = $request->getHeader('authorization');
|
||||||
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header[0]));
|
$jwt = trim(preg_replace('/^(?:\s+)?Bearer\s/', '', $header[0]));
|
||||||
|
Loading…
Reference in New Issue
Block a user