public function SamlController::acs in SAML Authentication 8.3
Same name and namespace in other branches
- 8 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::acs()
- 8.2 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::acs()
- 4.x src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::acs()
Performs the 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
\Symfony\Component\HttpFoundation\Response The HTTP response to send back.
1 string reference to 'SamlController::acs'
File
- src/
Controller/ SamlController.php, line 258
Class
- SamlController
- Returns responses for samlauth module routes.
Namespace
Drupal\samlauth\ControllerCode
public function acs() {
// We don't necessarily need to wrap our code in a render context: because
// our redirect is always internal, we could work with a plain
// non-cacheable RedirectResponse which will not cause a "leaked metadata"
// exception even if some code leaks metadata. But we'll use the same
// pattern as our other routes, for consistency/code reuse, and to log more
// possible 'leaky' code. We count on the routing.yml to specify the
// response is not cacheable.
$function = function () {
$ok = $this->saml
->acs();
return $this
->getRedirectUrlAfterProcessing(TRUE, !$ok);
};
return $this
->getTrustedRedirectResponse($function, 'processing SAML authentication response', '<front>');
}