Class

ezpRestToken

class ezpRestToken implements ezcPersistentObject

Data class ezprest_tokens.

Class to be used with eZ Components PersistentObject.

Properties

string $id id
string $refresh_token refresh_token
int $expirytime expirytime
string $client_id client_id
int $user_id user_id
string $scope scope

Methods

void setState(array $state)

Set the PersistentObject state.

array(string=>mixed) getState()

Get the PersistentObject state.

static string generateToken($vary)

Generates a random token.

static ezpRestToken fetch(string $accessToken, bool $authCheck = true)

Fetches an ezpRestToken persistent object from an access token

Details

at line 60
public void setState(array $state)

Set the PersistentObject state.

Parameters

array $state The state to set.

Return Value

void

at line 73
public array(string=>mixed) getState()

Get the PersistentObject state.

Return Value

array(string=>mixed) The state of the object.

at line 92
static public string generateToken($vary)

Generates a random token.

Code is adopted from MvcAuthenticationTiein

Parameters

$vary

Return Value

string The token.

at line 109
static public ezpRestToken fetch(string $accessToken, bool $authCheck = true)

Fetches an ezpRestToken persistent object from an access token

Parameters

string $accessToken Access token hash string
bool $authCheck If true, will also check if token corresponds to a client app authorized by its user

Return Value

ezpRestToken