You are here

public function SamlService::logout in SAML Authentication 8

Same name and namespace in other branches
  1. 8.3 src/SamlService.php \Drupal\samlauth\SamlService::logout()
  2. 8.2 src/SamlService.php \Drupal\samlauth\SamlService::logout()
  3. 4.x src/SamlService.php \Drupal\samlauth\SamlService::logout()

Initiate a SAML2 logout flow.

Parameters

null $return_to: The path to return the user to after a successful login.

File

src/SamlService.php, line 86
Contains Drupal\samlauth\SamlService.

Class

SamlService
Class SamlService.

Namespace

Drupal\samlauth

Code

public function logout($return_to = null) {
  user_logout();
  $this->auth
    ->logout($return_to, array(
    'referrer' => $return_to,
  ));
}