You are here

public function SamlController::sls in SAML Authentication 8

Same name and namespace in other branches
  1. 8.3 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()

Single Logout Service

Return URL for the sls service on the identity provider.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse

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

File

src/Controller/SamlController.php, line 119
Contains Drupal\samlauth\Controller\SamlController.

Class

SamlController
Class SamlController.

Namespace

Drupal\samlauth\Controller

Code

public function sls() {
  $this->saml_user
    ->logout();
  $route = $this->saml_user
    ->getPostLogoutDestination();
  $url = \Drupal::urlGenerator()
    ->generateFromRoute($route);
  return new RedirectResponse($url);
}