You are here

public function SamlController::sls in SAML Authentication 8.3

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

Performs the Single Logout Service.

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

Return value

\Symfony\Component\HttpFoundation\Response The HTTP response to send back.

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

File

src/Controller/SamlController.php, line 282

Class

SamlController
Returns responses for samlauth module routes.

Namespace

Drupal\samlauth\Controller

Code

public function sls() {
  $function = function () {
    return $this->saml
      ->sls() ?: $this
      ->getRedirectUrlAfterProcessing();
  };

  // This response redirects to an external URL in most cases. (Except for
  // SP-initiated logout that was initially started from this SP, i.e.
  // through the logout() route). We count on the routing.yml to specify that
  // it's not cacheable.
  return $this
    ->getShortenedRedirectResponse($function, 'processing SAML single-logout response', '<front>');
}