You are here

public function SamlService::logout in SAML Authentication 8.2

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

Initiates a SAML2 logout flow and redirects to the IdP.

Parameters

null $return_to: (optional) The path to return the user to after successful processing by the IDP.

Return value

string The URL of the single logout service to redirect to, including query parameters.

File

src/SamlService.php, line 146

Class

SamlService
Governs communication between the SAML toolkit and the IDP / login behavior.

Namespace

Drupal\samlauth

Code

public function logout($return_to = null) {
  return $this
    ->getSamlAuth()
    ->logout($return_to, [], $this->privateTempStore
    ->get('name_id'), $this->privateTempStore
    ->get('session_index'), TRUE, $this->privateTempStore
    ->get('name_id_format'));
}