You are here

function oauth2_server_token_load in OAuth2 Server 7

Loads a single token entity.

Parameters

string $token: The token.

Return value

OAuth2ServerToken|FALSE The token entity, or FALSE.

6 calls to oauth2_server_token_load()
Storage::getAccessToken in lib/Drupal/oauth2_server/Storage.php
Storage::getRefreshToken in lib/Drupal/oauth2_server/Storage.php
Storage::setAccessToken in lib/Drupal/oauth2_server/Storage.php
Storage::setRefreshToken in lib/Drupal/oauth2_server/Storage.php
Storage::unsetAccessToken in lib/Drupal/oauth2_server/Storage.php

... See full list

File

./oauth2_server.module, line 648
Provides OAuth2 server functionality.

Code

function oauth2_server_token_load($token) {
  $tokens = oauth2_server_entity_load_by_properties('oauth2_server_token', array(
    'token' => $token,
  ));
  return $tokens ? reset($tokens) : FALSE;
}