You are here

function shib_auth_redirect in Shibboleth Authentication 6.4

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

Redirects user to the handler url, and handles return option

Parameters

handlerurl url of the login / logout handler:

return the path the user will be redirected after Shibboleth processing:

2 calls to shib_auth_redirect()
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_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 713
Drupal Shibboleth authentication module.

Code

function shib_auth_redirect($handlerurl, $return = NULL) {
  $options = array();

  //recognize, if logout handler contains variables
  $handler = explode('?', $handlerurl);
  if (isset($handler[1])) {
    parse_str($handler[1], $options);
  }
  if (isset($return)) {
    $options['return'] = $return;
  }
  drupal_goto($handler[0], $options);
}