mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-02 00:43:11 +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