You are here

public function OpenIDConnectOktaClient::getEndpoints in OpenID Connect / OAuth client 8

Same name and namespace in other branches
  1. 2.x src/Plugin/OpenIDConnectClient/OpenIDConnectOktaClient.php \Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectOktaClient::getEndpoints()

Returns an array of endpoints.

Return value

array An array with the following keys:

  • authorization: The full url to the authorization endpoint.
  • token: The full url to the token endpoint.
  • userinfo: The full url to the userinfo endpoint.

Overrides OpenIDConnectClientInterface::getEndpoints

File

src/Plugin/OpenIDConnectClient/OpenIDConnectOktaClient.php, line 47

Class

OpenIDConnectOktaClient
Okta OpenID Connect client.

Namespace

Drupal\openid_connect\Plugin\OpenIDConnectClient

Code

public function getEndpoints() {

  // From https://developer.okta.com/docs/reference/api/oidc and
  // https://${yourOktaDomain}/.well-known/openid-configuration
  return [
    'authorization' => 'https://' . $this->configuration['okta_domain'] . '/oauth2/v1/authorize',
    'token' => 'https://' . $this->configuration['okta_domain'] . '/oauth2/v1/token',
    'userinfo' => 'https://' . $this->configuration['okta_domain'] . '/oauth2/v1/userinfo',
  ];
}