private function Oauth2ClientService::getClientCredentialsAccessToken in OAuth2 Client 8.2
Retrieves an access token for the 'client_credentials' grant type.
Return value
\League\OAuth2\Client\Token\AccessTokenInterface The Access Token for the given client ID.
1 call to Oauth2ClientService::getClientCredentialsAccessToken()
- Oauth2ClientService::getAccessToken in src/
Service/ Oauth2ClientService.php
File
- src/
Service/ Oauth2ClientService.php, line 161
Class
- Oauth2ClientService
- The OAuth2 Client service.
Namespace
Drupal\oauth2_client\ServiceCode
private function getClientCredentialsAccessToken($clientId) {
$access_token = $this
->retrieveAccessToken($clientId);
if (!$access_token) {
$access_token = $this->grantServices['client_credentials']
->getAccessToken($clientId);
}
return $access_token;
}