protected function Oauth2ClientGrantServiceBase::storeAccessToken in OAuth2 Client 8.3
Same name and namespace in other branches
- 8.2 src/Service/Grant/Oauth2ClientGrantServiceBase.php \Drupal\oauth2_client\Service\Grant\Oauth2ClientGrantServiceBase::storeAccessToken()
Store an access token using plugin specific storage.
Parameters
string $pluginId: The client for which a provider should be created.
\League\OAuth2\Client\Token\AccessTokenInterface $accessToken: The Access Token to be stored.
4 calls to Oauth2ClientGrantServiceBase::storeAccessToken()
- AuthorizationCodeGrantService::requestAccessToken in src/
Service/ Grant/ AuthorizationCodeGrantService.php - Executes an authorization_code grant request with the give code.
- ClientCredentialsGrantService::getAccessToken in src/
Service/ Grant/ ClientCredentialsGrantService.php - Get an OAuth2 access token.
- RefreshTokenGrantService::getAccessToken in src/
Service/ Grant/ RefreshTokenGrantService.php - Get an OAuth2 access token.
- ResourceOwnersCredentialsGrantService::getAccessToken in src/
Service/ Grant/ ResourceOwnersCredentialsGrantService.php - Get an OAuth2 access token.
File
- src/
Service/ Grant/ Oauth2ClientGrantServiceBase.php, line 119
Class
- Oauth2ClientGrantServiceBase
- Base class for OAuth2 Client grant services.
Namespace
Drupal\oauth2_client\Service\GrantCode
protected function storeAccessToken($pluginId, AccessTokenInterface $accessToken) {
$client = $this->oauth2ClientPluginManager
->createInstance($pluginId);
$client
->storeAccessToken($accessToken);
}