class OAuthServerAction

Class OAuthServerAction

Properties

WebserviceController $mod
protected string $scopeSeparator
protected array $validScopes

Methods

string
auth_error_response(string $error_type = 'invalid_client', string $error_description = null)

Return Auth Error Response

string
authorize()

Authorize Clients

bool
authorize_api_access(string $access_token)

API Access

array
getEndpointInformation()

Return Endpoint information to be used in OAuth Flows

string
getScopeSeparator()

No description

string|null
get_authorization_url(string $client_id, int $user_id, string $scope, int $ttl = 3600)

Return Authorization URL

bool
hasScopeAccess(string $bearerToken, string $instance)

No description

init()

No description

string
is_authorization_code_valid(string $auth_code, int $user_id = null)

Returns true if the passed authorization code is still valid

string
revoke()

Revokes a given token by deleting the corresponding OAuth Access model.

Details

at line 286
string auth_error_response(string $error_type = 'invalid_client', string $error_description = null)

Return Auth Error Response

Parameters

string $error_type
string $error_description

Return Value

string

at line 88
string authorize()

Authorize Clients

Return Value

string

Exceptions

ContentException
Exception

at line 170
bool authorize_api_access(string $access_token)

API Access

Parameters

string $access_token

Return Value

bool

at line 648
array getEndpointInformation()

Return Endpoint information to be used in OAuth Flows

Return Value

array

at line 135
string getScopeSeparator()

No description

Return Value

string

at line 273
string|null get_authorization_url(string $client_id, int $user_id, string $scope, int $ttl = 3600)

Return Authorization URL

Parameters

string $client_id
int $user_id
string $scope
int $ttl

Return Value

string|null

Exceptions

Exception

at line 145
bool hasScopeAccess(string $bearerToken, string $instance)

No description

Parameters

string $bearerToken
string $instance

Return Value

bool

at line 50
init()

No description

at line 248
string is_authorization_code_valid(string $auth_code, int $user_id = null)

Returns true if the passed authorization code is still valid

Parameters

string $auth_code
int $user_id

Return Value

string

at line 321
string revoke()

Revokes a given token by deleting the corresponding OAuth Access model.

Return Value

string

Exceptions

ContentException