You are here

protected static function Client::discardToken in OAuth2 Client 7.2

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

Remove token from storage.

Parameters

$key: The token identifier.

1 call to Client::discardToken()
Client::clearToken in src/Client.php
Clear the token data.

File

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

Class

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

Namespace

OAuth2

Code

protected static function discardToken($key) {
  if (isset($_SESSION['oauth2_client']['token'][$key])) {
    unset($_SESSION['oauth2_client']['token'][$key]);
  }
}