You are here

function oauth2_server_authorization_code_load in OAuth2 Server 7

Loads a single authorization code entity.

Parameters

string $code: The code.

Return value

OAuth2ServerAuthorizationCode|FALSE The authorization code entity, or FALSE.

3 calls to oauth2_server_authorization_code_load()
Storage::expireAuthorizationCode in lib/Drupal/oauth2_server/Storage.php
Storage::getAuthorizationCode in lib/Drupal/oauth2_server/Storage.php
Storage::setAuthorizationCode in lib/Drupal/oauth2_server/Storage.php

File

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

Code

function oauth2_server_authorization_code_load($code) {
  $codes = oauth2_server_entity_load_by_properties('oauth2_server_authorization_code', array(
    'code' => $code,
  ));
  return $codes ? reset($codes) : FALSE;
}