Methods
ApiV2Authenticator constructor.
__construct(\Slim\Slim $api, array $uri)
Authorize request with HTTP Basic Authorization
authorize(string $controllerName)
Call this method in every API operation that needs to be authorized with the HTTP Basic
Authorization technique.
link
|
Not available to child-controllers (private method).
|
|
|
Throws |
- \HttpApiV2Exception
If request does not provide the "Authorization" header or if the
credentials are invalid.
- \InvalidArgumentException
If the username or password values are invalid.
- \JsonWebTokenException
If a JWT supplied via “Authorization: Bearer” is found to be invalid
|
Arguments
$controllerName
string
Name of the parent controller for this api call.
Authorizes requests by Basic Auth.
authorizeBasicAuth( $controllerName)
|
|
Throws |
- \HttpApiV2Exception
|
Arguments
Authorize requests with JWT header.
authorizeBearer( $controllerName)
|
|
Throws |
- \HttpApiV2Exception
- \JsonWebTokenException
|
Arguments
Properties