You are here

private function LdapSsoBootSubscriber::transferSsoLoginController in LDAP Single Sign On 8

Same name and namespace in other branches
  1. 8.4 src/LdapSsoBootSubscriber.php \Drupal\ldap_sso\LdapSsoBootSubscriber::transferSsoLoginController()

Continue booting assuming we are doing SSO.

1 call to LdapSsoBootSubscriber::transferSsoLoginController()
LdapSsoBootSubscriber::checkSsoLoad in src/LdapSsoBootSubscriber.php
Determine if we should attempt SSO.

File

src/LdapSsoBootSubscriber.php, line 114

Class

LdapSsoBootSubscriber
Provides the automated single sign-on provider.

Namespace

Drupal\ldap_sso

Code

private function transferSsoLoginController() {

  // This is set to destination() since the request uri is usually
  // system/40x already.
  $original_path = $this->redirectDestination
    ->get();
  $pathWithDestination = Url::fromRoute('ldap_sso.login_controller')
    ->toString() . '?destination=' . $original_path;
  $cookies[] = new Cookie('sso_login_running', 'true', 0, base_path());
  $response = new RedirectResponseWithCookie($pathWithDestination, 302, $cookies);
  $response
    ->send();
}