From 82ea0d6c6f4fb66b35bfdaa36bcc4e61e076d589 Mon Sep 17 00:00:00 2001
From: Sonia Zorba <sonia.zorba@inaf.it>
Date: Wed, 11 Dec 2019 16:59:28 +0100
Subject: [PATCH] Small fix

---
 include/front-controller.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/front-controller.php b/include/front-controller.php
index 5d8f3ce..88010c7 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);
-- 
GitLab