You are here

function hook_saml_sp_settings_alter in SAML Service Provider 7

Same name and namespace in other branches
  1. 8.3 saml_sp.api.inc \hook_saml_sp_settings_alter()
  2. 8.2 saml_sp.api.inc \hook_saml_sp_settings_alter()
  3. 7.8 saml_sp.api.inc \hook_saml_sp_settings_alter()
  4. 7.2 saml_sp.api.inc \hook_saml_sp_settings_alter()
  5. 7.3 saml_sp.api.inc \hook_saml_sp_settings_alter()
  6. 4.x saml_sp.api.inc \hook_saml_sp_settings_alter()
  7. 3.x saml_sp.api.inc \hook_saml_sp_settings_alter()

Alter the settings used when generating SAML requests.

Parameters

OneLogin_Saml_Settings $settings:

1 invocation of hook_saml_sp_settings_alter()
saml_sp__get_settings in ./saml_sp.module
Get the SAML settings for an IDP.

File

./saml_sp.api.inc, line 13
API hooks for SAML Service Provider module.

Code

function hook_saml_sp_settings_alter(&$settings) {

  // Change the consuming URL to a custom endpoint.
  if ($settings->login_url == 'http://example.com/saml/foo') {
    $settings->spReturnUrl = url('saml/custom_action', array(
      'absolute' => TRUE,
    ));
  }
}