public function Oauth2ClientService::getProvider in OAuth2 Client 8.3
Same name and namespace in other branches
- 8.2 src/Service/Oauth2ClientService.php \Drupal\oauth2_client\Service\Oauth2ClientService::getProvider()
Obtains a Provider from the relevant service.
Parameters
string $pluginId: The client for which a provider should be obtained.
Return value
\League\OAuth2\Client\Provider\GenericProvider The provider of the OAuth2 Server.
Throws
\Drupal\oauth2_client\Exception\InvalidOauth2ClientException Thrown in the upstream League library.
File
- src/
Service/ Oauth2ClientService.php, line 125
Class
- Oauth2ClientService
- The OAuth2 Client service.
Namespace
Drupal\oauth2_client\ServiceCode
public function getProvider($pluginId) {
$client = $this
->getClient($pluginId);
return $this->grantServices[$client
->getGrantType()]
->getGrantProvider($pluginId);
}