29 $auth = $this->request->getHeader(
'Authorization');
35 if (strtolower(substr(
$auth, 0, 7)) !==
'bearer ') {
39 return substr(
$auth, 7);
51 $this->response->addHeader(
'WWW-Authenticate',
'Bearer realm="' . $this->realm .
'"');
52 $this->response->setStatus(401);
HTTP Bearer authentication utility.
requireLogin()
This method sends the needed HTTP header and statuscode (401) to force authentication.
getToken()
This method returns a string with an access token.
HTTP Authentication base class.