You are here

public function SamlService::login in SAML Authentication 8.2

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

Initiates a SAML2 authentication flow and redirects to the IDP.

Parameters

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

Return value

string The URL of the single sign-on service to redirect to, including query parameters.

File

src/SamlService.php, line 131

Class

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

Namespace

Drupal\samlauth

Code

public function login($return_to = null) {
  return $this
    ->getSamlAuth()
    ->login($return_to, [], FALSE, FALSE, TRUE);
}