You are here

function shib_auth_get_redirect_base in Shibboleth Authentication 6.4

Same name and namespace in other branches
  1. 7.4 shib_auth.module \shib_auth_get_redirect_base()
3 calls to shib_auth_get_redirect_base()
shib_auth_cancel_custom in ./shib_auth.module
Cancel button is pressed, redirect user to shib logout, and then to the page he came from / loginurl
shib_auth_generate_login_url in ./shib_auth.module
Generates shibboleth login url based on configuration
shib_auth_user in ./shib_auth.module
Let the user exit from the Shibboleth authority when he/she log out from the actual Drupal site.

File

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

Code

function shib_auth_get_redirect_base($handlerurl) {
  $handlerprotocol = 'http';
  if ($handlerurl[0] == '/') {
    if (isset($_SERVER['HTTPS']) || shib_auth_config('force_https')) {
      $handlerprotocol = 'https';
    }
    return $handlerprotocol . '://' . $_SERVER['HTTP_HOST'] . $handlerurl;
  }
  return $handlerurl;
}