Documentation

GrantedScopesGetResponse extends ApiResponse

Response from Authlete's /api/client/granted_scopes/get/{clientId} API.

Table of Contents

copyFromArray()  : mixed
Copy the content of the given array into this object.
copyToArray()  : mixed
Copy the content of this object into the given array.
fromArray()  : static
Convert an array into an instance of this class.
fromJson()  : static
Convert a JSON string into an instance of this class.
getClientId()  : int|string
Get the ID of the client application.
getLatestGrantedScopes()  : array<string|int, string>
Get the scopes granted to the client application by the last authorization process by the end-user (who is identified by the subject).
getMergedGrantedScopes()  : array<string|int, string>
Get the scopes granted to the client application by all the past authorization processes.
getModifiedAt()  : int|string
Get the timestamp in milliseconds since the Unix epoch (1970-Jan-1) at which the record was modified.
getResultCode()  : string
Get the code of the result of an Authlete API call.
getResultMessage()  : string
Get the message of the result of an Authlete API call.
getServiceApiKey()  : int|string
Get the API key of the service.
getSubject()  : string
Get the subject (= unique identifier) of the end-user who has granted authorization to the client application.
setClientId()  : GrantedScopesGetResponse
Set the ID of the client application.
setLatestGrantedScopes()  : GrantedScopesGetResponse
Set the scopes granted to the client application by the last authorization process by the end-user (who is identified by the subject).
setMergedGrantedScopes()  : GrantedScopesGetResponse
Set the scopes granted to the client application by all the past authorization processes.
setModifiedAt()  : GrantedScopesGetResponse
Set the timestamp in milliseconds since the Unix epoch (1970-Jan-1) at which the record was modified.
setResultCode()  : ApiResponse
Set the code of the result of an Authlete API call.
setResultMessage()  : ApiResponse
Set the message of the result of an Authlete API call.
setServiceApiKey()  : GrantedScopesGetResponse
Set the API key of the service.
setSubject()  : GrantedScopesGetResponse
Set the subject (= unique identifier) of the end-user who has granted authorization to the client application.
toArray()  : array<string|int, mixed>
Convert this object into an array.
toJson()  : string
Convert this object into a JSON string.

Methods

copyFromArray()

Copy the content of the given array into this object.

public copyFromArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

copyToArray()

Copy the content of this object into the given array.

public copyToArray(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

fromArray()

Convert an array into an instance of this class.

public static fromArray([array<string|int, mixed> $array = null ]) : static

This static function returns a new instance of this class. If $array is null, null is returned.

Parameters
$array : array<string|int, mixed> = null

An array

Return values
static

An instance of this class.

fromJson()

Convert a JSON string into an instance of this class.

public static fromJson(string $json) : static

This static function returns a new instance of this class. If $json is null or the type of $json is not string, null is returned.

Parameters
$json : string

A JSON string.

Return values
static

An instance of this class.

getClientId()

Get the ID of the client application.

public getClientId() : int|string
Return values
int|string

The ID of the client application. (64-bit integer if your PHP system can handle 64-bit integers.)

getLatestGrantedScopes()

Get the scopes granted to the client application by the last authorization process by the end-user (who is identified by the subject).

public getLatestGrantedScopes() : array<string|int, string>

null means that there is no record about granted scopes. An empty array means that there exists a record about granted scopes but no scope has been granted to the client application. If the returned array holds some elements, they are the scopes granted to the client application by the last authorization process.

Return values
array<string|int, string>

The scopes granted to the client application by the last authorization process by the end-user.

getMergedGrantedScopes()

Get the scopes granted to the client application by all the past authorization processes.

public getMergedGrantedScopes() : array<string|int, string>

null means that there is no record about granted scopes. An empty array means that there exists a record about granted scopes but no scope has been granted to the client application. If the returned array holds some elements, they are the scopes granted to the client application by all the last authorization processes.

Note that revoked scopes are not included.

Return values
array<string|int, string>

The scopes granted to the client application by all the past authorization processes.

getModifiedAt()

Get the timestamp in milliseconds since the Unix epoch (1970-Jan-1) at which the record was modified.

public getModifiedAt() : int|string
Return values
int|string

The timestamp at which the record was modified. (64-bit integer if your PHP system can handle 64-bit integers.)

getResultCode()

Get the code of the result of an Authlete API call.

public getResultCode() : string
Return values
string

The result code.

getResultMessage()

Get the message of the result of an Authlete API call.

public getResultMessage() : string
Return values
string

The result message.

getServiceApiKey()

Get the API key of the service.

public getServiceApiKey() : int|string
Return values
int|string

The API key of the service. (64-bit integer if your PHP system can handle 64-bit integers.)

getSubject()

Get the subject (= unique identifier) of the end-user who has granted authorization to the client application.

public getSubject() : string
Return values
string

The subject (= unique identifer) of the end-user.

setLatestGrantedScopes()

Set the scopes granted to the client application by the last authorization process by the end-user (who is identified by the subject).

public setLatestGrantedScopes([array<string|int, string> $scopes = null ]) : GrantedScopesGetResponse
Parameters
$scopes : array<string|int, string> = null

The scopes granted to the client application by the last authorization process by the end-user.

Return values
GrantedScopesGetResponse

$this object.

setMergedGrantedScopes()

Set the scopes granted to the client application by all the past authorization processes.

public setMergedGrantedScopes([array<string|int, string> $scopes = null ]) : GrantedScopesGetResponse
Parameters
$scopes : array<string|int, string> = null

The scopes granted to the client application by all the past authorization processes.

Return values
GrantedScopesGetResponse

$this object.

setModifiedAt()

Set the timestamp in milliseconds since the Unix epoch (1970-Jan-1) at which the record was modified.

public setModifiedAt(int|string $modifiedAt) : GrantedScopesGetResponse
Parameters
$modifiedAt : int|string

The timestamp at which the record was modified. (64-bit integer if your PHP system can handle 64-bit integers.)

Return values
GrantedScopesGetResponse

$this object.

setResultCode()

Set the code of the result of an Authlete API call.

public setResultCode(string $resultCode) : ApiResponse
Parameters
$resultCode : string

The result code.

Return values
ApiResponse

$this object.

setResultMessage()

Set the message of the result of an Authlete API call.

public setResultMessage(string $resultMessage) : ApiResponse
Parameters
$resultMessage : string

The result message.

Return values
ApiResponse

$this object.

toArray()

Convert this object into an array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array.

toJson()

Convert this object into a JSON string.

public toJson(int $options) : string
Parameters
$options : int

Options passed to json_encode(). This parameter is optional and its default value is 0.

Return values
string

A JSON string.

Search results