public function SamlSPController::metadata in SAML Service Provider 8.2
Same name and namespace in other branches
- 8.3 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 27 - Contains \Drupal\samlsp\Controller\SamlSPController.
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;
}