public function SamlSPController::metadata in SAML Service Provider 8.3
Same name and namespace in other branches
- 8.2 src/Controller/SamlSPController.php \Drupal\saml_sp\Controller\SamlSPController::metadata()
- 4.x src/Controller/SamlSPController.php \Drupal\saml_sp\Controller\SamlSPController::metadata()
- 3.x src/Controller/SamlSPController.php \Drupal\saml_sp\Controller\SamlSPController::metadata()
Generate the XMl metadata for the given IdP.
1 string reference to 'SamlSPController::metadata'
File
- src/
Controller/ SamlSPController.php, line 21
Class
- SamlSPController
- Provides route responses for the SAML SP module.
Namespace
Drupal\saml_sp\ControllerCode
public function metadata($return_string = FALSE) {
list($metadata, $errors) = saml_sp__get_metadata();
$output = $metadata;
if ($return_string) {
return $output;
}
$response = new Response();
$response
->setContent($metadata);
$response->headers
->set('Content-Type', 'text/xml');
return $response;
}