| Methods |
public
|
__construct()
|
#
|
public
|
initClient(): void
Authenticates the OAuth client.
Authenticates the OAuth client.
This function detects whether credentials for an OAuth client is
presented in the Authorization header or the POST body.
|
#
|
public
|
isClientAuthenticated(bool $send_challenge = false, array<string>|null $auth_methods = null): bool
Returns whether an authenticated OAuth client is present.
Returns whether an authenticated OAuth client is present.
If the $send_challenge parameter is set to true, a WWW-Authenticate
header will be sent if an authenticated OAuth client is
not present
Parameters
| $send_challenge |
if a challenge is to be sent
|
| $auth_methods |
expected authentication method
|
Returns
true if an authenticated OAuth client is present
|
#
|
public
|
getClient(): OAuthClient|null
Returns the authenticated OAuth client, if any.
Returns the authenticated OAuth client, if any.
Returns
the authenticated OAuth client, or null
|
#
|
public
|
getClientAuthMethod(): string
Returns the method used to authenticate the current OAuth client.
Returns the method used to authenticate the current OAuth client.
Returns
the authentication method
|
#
|
public
|
getSupportedClientAuthMethods(): array<string>
Returns a list of supported methods to authenticate an OAuth client
Returns a list of supported methods to authenticate an OAuth client
Returns
a list of supported methods
|
#
|
public
|
initAccessToken(bool $include_request_body = false): void
Authenticates the OAuth access token.
Authenticates the OAuth access token.
This function detects whether an access token has been presented.
Parameters
| $include_request_body |
if true, also detects access tokens
from the request body
|
|
#
|
protected
|
initBearerAccessToken(bool $include_request_body = false): string
Authenticates the OAuth bearer access token.
Authenticates the OAuth bearer access token.
Parameters
| $include_request_body |
if true, also detects access tokens
from the request body
|
|
#
|
public
|
getAccessToken(): AccessToken|null
Returns the access token included in the request.
Returns the access token included in the request.
Returns
|
#
|
public
|
isTokenAuthorized(array<string>|string $scope, string &$error = null): bool
Returns whether the current access token is authorised under the
specified scope.
Returns whether the current access token is authorised under the
specified scope.
Parameters
| $scope |
the scope
|
| $error |
the error code returned if the access token
is not authorised
|
Returns
true if the access token is authorised
|
#
|