Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ezpRestToken Class Reference
Inheritance diagram for ezpRestToken:

## Public Member Functions
| setState (array $state)
| getState ()

## Static Public Member Functions
static | generateToken ( $vary)
static | fetch ( $accessToken, $authCheck=true)

## Public Attributes
| $id
| $refresh_token
| $expirytime
| $client_id
| $user_id
| $scope

## Detailed Description

Data class ezprest_tokens. Class to be used with eZ Components PersistentObject.

Definition at line 16 of file ezprest_token.php.

## Member Function Documentation

## ◆ fetch()

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

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

Returns
  ezpRestToken

Definition at line 110 of file ezprest_token.php.

References $q, and $session.

Referenced by ezpOauthFilter\run().

## ◆ generateToken()

static ezpRestToken::generateToken | ( |  | $vary | ) |
| static

Generates a random token.

Code is adopted from MvcAuthenticationTiein

Returns
  string The token.

Definition at line 93 of file ezprest_token.php.

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

## ◆ getState()

ezpRestToken::getState | ( |  | ) |

Get the PersistentObject state.

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

Definition at line 74 of file ezprest_token.php.

## ◆ setState()

ezpRestToken::setState | ( | array | $state | ) |

Set the PersistentObject state.

Parameters

  array(string=>mixed) | $state The state to set.

Returns
  void

Definition at line 61 of file ezprest_token.php.

## Member Data Documentation

## ◆ $client_id

ezpRestToken::$client_id

Definition at line 41 of file ezprest_token.php.

## ◆ $expirytime

ezpRestToken::$expirytime

Definition at line 35 of file ezprest_token.php.

## ◆ $id

ezpRestToken::$id

Definition at line 23 of file ezprest_token.php.

## ◆ $refresh_token

ezpRestToken::$refresh_token

Definition at line 29 of file ezprest_token.php.

## ◆ $scope

ezpRestToken::$scope

Definition at line 53 of file ezprest_token.php.

## ◆ $user_id

ezpRestToken::$user_id

Definition at line 47 of file ezprest_token.php.

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

- ezprest_token.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.