You are here

protected function OpenIDConnectClientBase::getRedirectUrl in OpenID Connect / OAuth client 8

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

Returns the redirect URL.

Parameters

array $route_parameters: See \Drupal\Core\Url::fromRoute() for details.

array $options: See \Drupal\Core\Url::fromRoute() for details.

Return value

\Drupal\Core\Url A new Url object for a routed (internal to Drupal) URL.

See also

\Drupal\Core\Url::fromRoute()

File

src/Plugin/OpenIDConnectClientBase.php, line 426

Class

OpenIDConnectClientBase
Base class for OpenID Connect client plugins.

Namespace

Drupal\openid_connect\Plugin

Code

protected function getRedirectUrl(array $route_parameters = [], array $options = []) {
  $language_none = $this->languageManager
    ->getLanguage(LanguageInterface::LANGCODE_NOT_APPLICABLE);
  $route_parameters += [
    'client_name' => $this->pluginId,
  ];
  $options += [
    'absolute' => TRUE,
    'language' => $language_none,
  ];
  return Url::fromRoute('openid_connect.redirect_controller_redirect', $route_parameters, $options);
}