You are here

public function Oauth2ClientPluginBase::getRedirectUri in OAuth2 Client 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/Oauth2Client/Oauth2ClientPluginBase.php \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginBase::getRedirectUri()

Retrieves the redirect_uri of the OAuth2 server.

Return value

string The redirect_uri of the OAuth2 server.

Overrides Oauth2ClientPluginInterface::getRedirectUri

File

src/Plugin/Oauth2Client/Oauth2ClientPluginBase.php, line 337

Class

Oauth2ClientPluginBase
Base class for Oauth2Client plugins.

Namespace

Drupal\oauth2_client\Plugin\Oauth2Client

Code

public function getRedirectUri() {
  $url = Url::fromRoute('oauth2_client.code', [
    'plugin' => $this
      ->getId(),
  ], [
    'absolute' => TRUE,
  ]);
  return $url
    ->toString(TRUE)
    ->getGeneratedUrl();
}