function saml_sp__get_settings in SAML Service Provider 7
Same name and namespace in other branches
- 8.3 saml_sp.module \saml_sp__get_settings()
- 8.2 saml_sp.module \saml_sp__get_settings()
- 7.8 saml_sp.module \saml_sp__get_settings()
- 7.2 saml_sp.module \saml_sp__get_settings()
- 7.3 saml_sp.module \saml_sp__get_settings()
- 4.x saml_sp.module \saml_sp__get_settings()
- 3.x saml_sp.module \saml_sp__get_settings()
Get the SAML settings for an IDP.
Parameters
Object $idp: An IDP object, such as that provided by saml_sp_idp_load($machine_name).
Return value
OneLogin_Saml_Settings IDP Settings data.
2 calls to saml_sp__get_settings()
- saml_sp_start in ./
saml_sp.module - Start a SAML authentication request.
- saml_sp__endpoint in ./
saml_sp.pages.inc - Page callback to complete the SAML authentication process. This is the consumer endpoint for all SAML authentication requests.
File
- ./
saml_sp.module, line 227 - SAML Service Provider
Code
function saml_sp__get_settings($idp) {
// Require all the relevant libraries.
_saml_sp__prepare();
// The consumer endpoint will always be /saml/consume.
$endpoint_url = url("saml/consume", array(
'absolute' => TRUE,
));
$settings = new OneLogin_Saml_Settings();
// URL of the IDP server.
$settings->idpSingleSignOnUrl = $idp->login_url;
// The IDP's public x.509 certificate.
$settings->idpPublicCertificate = $idp->x509_cert;
// Name to identify this application
$settings->spIssuer = $idp->app_name;
// Drupal URL to consume the response from the IDP.
$settings->spReturnUrl = $endpoint_url;
// Tells the IdP to return the email address of the current user
$settings->requestedNameIdFormat = OneLogin_Saml_Settings::NAMEID_EMAIL_ADDRESS;
// Invoke hook_saml_sp_settings_alter().
drupal_alter('saml_sp_settings', $settings);
return $settings;
}