You are here

function shib_auth_get_idp in Shibboleth Authentication 6.4

Same name and namespace in other branches
  1. 7.4 shib_auth.module \shib_auth_get_idp()

Get IdP name

Return value

IdP name

2 calls to shib_auth_get_idp()
shib_auth_save_authmap in ./shib_auth.module
Saves an entry into shib_authmap and also saves mail if changed A row in the authmap contains the drupal user id, the targeted id from Shibboleth, the IdP name, the date the user was created, and user consent version number. @uname the username got…
shib_auth_session_valid in ./shib_auth.module
Checks whether Shibboleth SP has set the Identity Provider $_SERVER field. It is always set if there is a Shibboleth SP session.

File

./shib_auth.module, line 235
Drupal Shibboleth authentication module.

Code

function shib_auth_get_idp() {
  if (isset($_SERVER['Shib-Identity-Provider'])) {
    return $_SERVER['Shib-Identity-Provider'];
  }
  elseif (isset($_SERVER['Shib_Identity_Provider'])) {
    return $_SERVER['Shib_Identity_Provider'];
  }
  elseif (isset($_SERVER['HTTP_SHIB_IDENTITY_PROVIDER'])) {
    return $_SERVER['HTTP_SHIB_IDENTITY_PROVIDER'];
  }
  elseif (isset($_SERVER['HTTP_SHIBIDENTITYPROVIDER'])) {
    return $_SERVER['HTTP_SHIBIDENTITYPROVIDER'];
  }
  return '';
}