You are here

public function AuthCodeAccessExample::retrieveAccessToken in OAuth2 Client 8.3

Retrieve the access token storage.

Return value

mixed The stored token, or NULL if no value exists.

Overrides Oauth2ClientPluginInterface::retrieveAccessToken

File

examples/oauth2_client_example_plugins/src/Plugin/Oauth2Client/AuthCodeAccessExample.php, line 67

Class

AuthCodeAccessExample
Auth code with access example.

Namespace

Drupal\oauth2_client_example_plugins\Plugin\Oauth2Client

Code

public function retrieveAccessToken() {
  $key = 'oauth2_client_access_token-' . $this
    ->getId();
  return $this->tempStore
    ->get($key);
}