eZPublish  4.7
ezpRestToken Class Reference

Data class ezprest_tokens. More...

+ Inheritance diagram for ezpRestToken:
+ Collaboration diagram for ezpRestToken:

Public Member Functions

 getState ()
 Get the PersistentObject state. More...
 
 setState (array $state)
 Set the PersistentObject state. More...
 

Static Public Member Functions

static fetch ($accessToken, $authCheck=true)
 Fetches an ezpRestToken persistent object from an access token. More...
 
static generateToken ($vary)
 Generates a random token. More...
 

Public Attributes

 $client_id
 
 $expirytime
 
 $id
 
 $refresh_token
 
 $scope
 
 $user_id
 

Detailed Description

Data class ezprest_tokens.

Class to be used with eZ Components PersistentObject.

Member Function Documentation

static ezpRestToken::fetch (   $accessToken,
  $authCheck = true 
)
static

Fetches an ezpRestToken persistent object from an access token.

Parameters
string$accessTokenAccess token hash string
bool$authCheckIf true, will also check if token corresponds to a client app authorized by its user
Returns
ezpRestToken

Referenced by ezpOauthFilter\run().

static ezpRestToken::generateToken (   $vary)
static

Generates a random token.

Code is adopted from MvcAuthenticationTiein

Returns
string The token.

Referenced by ezpOauthUtility\doRefreshToken(), and ezpOauthUtility\doRefreshTokenWithAuthorizationCode().

ezpRestToken::getState ( )

Get the PersistentObject state.

Returns
array(string=>mixed) The state of the object.
ezpRestToken::setState ( array  $state)

Set the PersistentObject state.

Parameters
array(string=>mixed)$state The state to set.
Returns
void

Member Data Documentation

ezpRestToken::$client_id
ezpRestToken::$expirytime
ezpRestToken::$id
ezpRestToken::$refresh_token
ezpRestToken::$scope
ezpRestToken::$user_id

The documentation for this class was generated from the following file: