diff --git a/include/front-controller.php b/include/front-controller.php index 5d8f3ced118e55c3234d81938b4aee2c971039c1..88010c7f41d835f1d8dda52d1b7b24c2afe5b628 100644 --- a/include/front-controller.php +++ b/include/front-controller.php @@ -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);