You are here

protected function ResourceOwnersCredentialsGrantService::getUsernamePassword in OAuth2 Client 8.3

Gets credential pairs by plugin id.

Parameters

string $pluginId: The id of the Oauth2Client plugin implementing this grant type.

Return value

array Associative array with `username` and `password` keys.

1 call to ResourceOwnersCredentialsGrantService::getUsernamePassword()
ResourceOwnersCredentialsGrantService::getAccessToken in src/Service/Grant/ResourceOwnersCredentialsGrantService.php
Get an OAuth2 access token.

File

src/Service/Grant/ResourceOwnersCredentialsGrantService.php, line 76

Class

ResourceOwnersCredentialsGrantService
Handles Authorization Grants for the OAuth2 Client module.

Namespace

Drupal\oauth2_client\Service\Grant

Code

protected function getUsernamePassword($pluginId) {
  return $this->usernamesPasswords[$pluginId] ?? [];
}