Exemple #1
0
 /**
  * Returns a 401 response with the referred URL and the app ID in a JSON response
  *
  * @return void
  */
 private function _badToken401()
 {
     $this->addCorsHeaders();
     Utils::header("HTTP/1.1 401 Unauthorized");
     Utils::header('Content-type: application/json');
     echo json_encode((object) ['tokenService' => $this->_tokenServiceUrl . "login?" . http_build_query(['redirectURL' => $this->_refUrl, 'service' => $this->_appID])]);
     // Use a testable method instead of calling exit() directly
     Utils::exitApp();
 }