Skip to content
Snippets Groups Projects
Commit 82ea0d6c authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Small fix

parent 40824ca8
No related branches found
No related tags found
No related merge requests found
......@@ -130,18 +130,18 @@ Flight::route('POST /auth/oauth2/check_token', function() {
$headers = apache_request_headers();
if (!isset($headers['Authorization'])) {
throw new BadRequestException("Missing Authorization header");
throw new \RAP\BadRequestException("Missing Authorization header");
}
$authorizationHeader = explode(" ", $headers['Authorization']);
if ($authorizationHeader[0] === "Bearer") {
$token = $authorizationHeader[1];
} else {
throw new BadRequestException("Invalid token type");
throw new \RAP\BadRequestException("Invalid token type");
}
if ($token === null) {
throw new BadRequestException("Access token is required");
throw new \RAP\BadRequestException("Access token is required");
}
$requestHandler = new \RAP\OAuth2RequestHandler($locator);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment