public function OpenIDConnectClientInterface::retrieveTokens in OpenID Connect / OAuth client 8
Same name and namespace in other branches
- 2.x src/Plugin/OpenIDConnectClientInterface.php \Drupal\openid_connect\Plugin\OpenIDConnectClientInterface::retrieveTokens()
Retrieve access token and ID token.
Exchanging the authorization code that is received as the result of the authentication request for an access token and an ID token.
The ID token is a cryptographically signed JSON object encoded in base64. It contains identity information about the user. The access token can be sent to the login provider to obtain user profile information.
Parameters
string $authorization_code: Authorization code received as a result of the the authorization request.
Return value
array|bool An associative array containing:
- id_token: The ID token that holds user data.
- access_token: Access token that can be used to obtain user profile information.
- expire: Unix timestamp of the expiration date of the access token.
Or FALSE if tokens could not be retrieved.
1 method overrides OpenIDConnectClientInterface::retrieveTokens()
- OpenIDConnectClientBase::retrieveTokens in src/
Plugin/ OpenIDConnectClientBase.php - Retrieve access token and ID token.
File
- src/
Plugin/ OpenIDConnectClientInterface.php, line 75
Class
- OpenIDConnectClientInterface
- Defines an interface for OpenID Connect client plugins.
Namespace
Drupal\openid_connect\PluginCode
public function retrieveTokens($authorization_code);