public function SamlController::login in SAML Authentication 8.2
Same name and namespace in other branches
- 8.3 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::login()
- 8 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::login()
- 4.x src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::login()
Initiates a SAML2 authentication flow.
This should redirect to the Login service on the IDP and then to our ACS. It does not actually log us in (yet).
1 string reference to 'SamlController::login'
File
- src/
Controller/ SamlController.php, line 106
Class
- SamlController
- Returns responses for samlauth module routes.
Namespace
Drupal\samlauth\ControllerCode
public function login() {
try {
$url = $this->saml
->login($this
->getUrlFromDestination());
} catch (Exception $e) {
$this
->handleException($e, 'initiating SAML login');
$url = Url::fromRoute('<front>');
}
return $this
->createRedirectResponse($url);
}