94 $bearerToken =
$auth->getToken($request);
96 return [
false,
"No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured"];
100 return [
false,
"Bearer token was incorrect"];
102 return [
true, $principalUrl];
134 $auth->requireLogin();
This interface represents a HTTP response.
The RequestInterface represents a HTTP request.
foreach($paths as $path) $request
challenge(RequestInterface $request, ResponseInterface $response)
This method is called when a user could not be authenticated, and authentication was required for the...
HTTP Bearer authentication utility.
validateBearerToken($bearerToken)
Validates a Bearer token.
check(RequestInterface $request, ResponseInterface $response)
When this method is called, the backend must check if authentication was successful.
HTTP Bearer authentication backend class.
This is the base class for any authentication object.
setRealm($realm)
Sets the authentication realm for this backend.