public function SamlController::metadata in SAML Authentication 8.2
Same name and namespace in other branches
- 8.3 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::metadata()
- 8 src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::metadata()
- 4.x src/Controller/SamlController.php \Drupal\samlauth\Controller\SamlController::metadata()
Displays service provider metadata XML for iDP autoconfiguration.
Return value
\Symfony\Component\HttpFoundation\Response
1 string reference to 'SamlController::metadata'
File
- src/
Controller/ SamlController.php, line 141
Class
- SamlController
- Returns responses for samlauth module routes.
Namespace
Drupal\samlauth\ControllerCode
public function metadata() {
try {
$metadata = $this->saml
->getMetadata();
} catch (Exception $e) {
$this
->handleException($e, 'processing SAML SP metadata');
return $this
->createRedirectResponse(Url::fromRoute('<front>'));
}
return new Response($metadata, 200, [
'Content-Type' => 'text/xml',
]);
}