You are here

public function SamlController::acs in SAML Authentication 8.2

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

Attribute Consumer Service.

This is usually the second step in the authentication flow; the Login service on the IDP should redirect (or: execute a POST request to) here.

Return value

\Drupal\Core\Routing\TrustedRedirectResponse

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

File

src/Controller/SamlController.php, line 161

Class

SamlController
Returns responses for samlauth module routes.

Namespace

Drupal\samlauth\Controller

Code

public function acs() {
  try {
    $this->saml
      ->acs();
    $url = $this
      ->getRedirectUrlAfterProcessing(TRUE);
  } catch (Exception $e) {
    $this
      ->handleException($e, 'processing SAML authentication response');
    $url = Url::fromRoute('<front>');
  }
  return $this
    ->createRedirectResponse($url);
}