kernel/private/rest/classes/models/ezprest_token.php

Show: inherited
Table of Contents

File containing the ezpRestToken class

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
kernel  
Version
4.6.0  

\ezpRestToken

Package: Default

Data class ezprest_tokens.

Class to be used with eZ Components PersistentObject.

Parent(s)
?\ezcPersistentObject

Properties

Propertypublicstring  $client_id= ''

client_id

Details
Type
string
Propertypublicint  $expirytime= ''

expirytime

Details
Type
int
Propertypublicstring  $id= ''

id

Details
Type
string
Propertypublicstring  $refresh_token= ''

refresh_token

Details
Type
string
Propertypublicstring  $scope= ''

scope

Details
Type
string
Propertypublicint  $user_id= ''

user_id

Details
Type
int

Methods

methodpublicfetch( string $accessToken, bool $authCheck = true ) : \ezpRestToken
static

Fetches an ezpRestToken persistent object from an access token

Parameters
Name Type Description
$accessToken string

Access token hash string

$authCheck bool

If true, will also check if token corresponds to a client app authorized by its user

Returns
Type Description
\ezpRestToken
methodpublicgenerateToken(  $vary ) : string
static

Generates a random token.

Code is adopted from MvcAuthenticationTiein

Parameters
Name Type Description
$vary
Returns
Type Description
string The token.
methodpublicgetState( ) : \array(string=>mixed)

Get the PersistentObject state.

Returns
Type Description
\array(string=>mixed) The state of the object.
methodpublicsetState( \array(string=>mixed) $state ) : void

Set the PersistentObject state.

Parameters
Name Type Description
$state \array(string=>mixed)

The state to set.

Documentation was generated by DocBlox 0.18.1.