You are here

public static function Client::storeToken in OAuth2 Client 7.2

Same name and namespace in other branches
  1. 7 oauth2_client.inc \OAuth2\Client::storeToken()

Store the token data.

Parameters

$key: The token identifier.

array $token: The token data to store.

3 calls to Client::storeToken()
Client::getAccessToken in src/Client.php
Get and return an access token.
oauth2_client_set_token in ./oauth2_client.module
Share an access token with oauth2_client.
oauth2_client_set_token in ./oauth2_client.api.php
Share an access token with oauth2_client.

File

src/Client.php, line 132
Class OAuth2\Client.

Class

Client
The class OAuth2\Client is used to communicate with an oauth2 server.

Namespace

OAuth2

Code

public static function storeToken($key, array $token) {
  $_SESSION['oauth2_client']['token'][$key] = $token;
}