You are here

public function SamlController::sls in SAML Authentication 8.2

Same name and namespace in other branches
  1. 8.3 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::sls()
  2. 8 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::sls()
  3. 4.x src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::sls()

Single Logout Service.

This is usually the second step in the logout flow; the SLS service on the IDP should redirect here.

Return value

\Drupal\Core\Routing\TrustedRedirectResponse

1 string reference to 'SamlController::sls'
samlauth.routing.yml in ./samlauth.routing.yml
samlauth.routing.yml

File

src/Controller/SamlController.php, line 182

Class

SamlController
Returns responses for samlauth module routes.

Namespace

Drupal\samlauth\Controller

Code

public function sls() {
  try {
    $url = $this->saml
      ->sls();
    if (!$url) {
      $url = $this
        ->getRedirectUrlAfterProcessing();
    }
  } catch (Exception $e) {
    $this
      ->handleException($e, 'processing SAML single-logout response');
    $url = Url::fromRoute('<front>');
  }
  return $this
    ->createRedirectResponse($url);
}