function shib_auth_get_redirect_base in Shibboleth Authentication 7.4
Same name and namespace in other branches
- 6.4 shib_auth.module \shib_auth_get_redirect_base()
Returns Shibboleth handler redirect base as an absolute URI.
Parameters
string $handlerurl: Relative handler URL.
Return value
string Redirect base in string.
3 calls to shib_auth_get_redirect_base()
- shib_auth_cancel_custom in ./
shib_auth.module - Redirects the user when Cancel button is pressed.
- shib_auth_exit in ./
shib_auth.module - Implements hook_exit().
- shib_auth_generate_login_url in ./
shib_auth.module - Generates shibboleth login URL based on configuration.
File
- ./
shib_auth.module, line 907 - 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['SERVER_NAME'] . $handlerurl;
}
return $handlerurl;
}