function saml_sp__get_metadata in SAML Service Provider 4.x
Same name and namespace in other branches
- 8.3 saml_sp.module \saml_sp__get_metadata()
- 8.2 saml_sp.module \saml_sp__get_metadata()
- 7.8 saml_sp.module \saml_sp__get_metadata()
- 7.2 saml_sp.module \saml_sp__get_metadata()
- 7.3 saml_sp.module \saml_sp__get_metadata()
- 3.x saml_sp.module \saml_sp__get_metadata()
Load the settings and get the metadata.
2 calls to saml_sp__get_metadata()
- SamlSpConfig::buildForm in src/
Form/ SamlSpConfig.php - Form constructor.
- SamlSPController::metadata in src/
Controller/ SamlSPController.php - Generate the XMl metadata for the given IdP.
File
- ./
saml_sp.module, line 234 - SAML Service Provider.
Code
function saml_sp__get_metadata() {
$settings = saml_sp__get_settings();
try {
$settings = new SamlSPSettings($settings);
$metadata = $settings
->getSPMetadata();
$errors = $settings
->validateMetadata($metadata);
} catch (Exception $e) {
$metadata = get_class($e) . ' - ' . $e
->getMessage();
}
return [
$metadata,
isset($errors) ? $errors : [],
];
}