ApiV2Authenticator
in package
Table of Contents
- $method : string
- $request : Request
- $response : Response
- $uri : array<string|int, mixed>
- __construct() : mixed
- ApiV2Authenticator constructor.
- authorize() : mixed
- Authorize request with HTTP Basic Authorization
- authorizeBasicAuth() : mixed
- Authorizes requests by Basic Auth.
- authorizeBearer() : mixed
- Authorize requests with JWT header.
Properties
$method
protected
string
$method
$request
protected
Request
$request
$response
protected
Response
$response
$uri
protected
array<string|int, mixed>
$uri
Methods
__construct()
ApiV2Authenticator constructor.
public
__construct(Request $request, Response $response, array<string|int, mixed> $uri) : mixed
Parameters
- $request : Request
- $response : Response
- $uri : array<string|int, mixed>
Return values
mixed —authorize()
Authorize request with HTTP Basic Authorization
public
authorize(string $controllerName) : mixed
Call this method in every API operation that needs to be authorized with the HTTP Basic Authorization technique.
Parameters
- $controllerName : string
-
Name of the parent controller for this api call.
Tags
Return values
mixed —authorizeBasicAuth()
Authorizes requests by Basic Auth.
protected
authorizeBasicAuth( $controllerName) : mixed
Parameters
Tags
Return values
mixed —authorizeBearer()
Authorize requests with JWT header.
protected
authorizeBearer( $controllerName) : mixed