You are here

function shib_auth_page_alter in Shibboleth Authentication 7.4

Executes isPassive script.

This footer part executes isPassive script, if the option was checked on the configuration page.

File

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

Code

function shib_auth_page_alter() {
  if (!shib_auth_session_valid() && shib_auth_config('is_passive') && !user_is_logged_in()) {
    $base = drupal_get_path('module', 'shib_auth');
    $my_settings = array(
      'login_url' => shib_auth_generate_login_url(),
    );
    drupal_add_js(array(
      'shib_auth' => $my_settings,
    ), array(
      'type' => 'setting',
      'scope' => JS_DEFAULT,
    ));
    drupal_add_js($base . '/isPassive.js', array(
      'scope' => 'footer',
    ));
    print drupal_get_js();
  }
}