You are here

function shib_auth_admin_advanced in Shibboleth Authentication 6.4

Same name and namespace in other branches
  1. 7.4 shib_auth_forms.inc \shib_auth_admin_advanced()

Generate the administration form of the Shibboleth authentication module @returns HTML text of the administration form

1 string reference to 'shib_auth_admin_advanced'
shib_auth_menu in ./shib_auth.module
Generate the menu element to access the Shibboleth authentication module's administration page @returns HTML text of the administer menu element

File

./shib_auth_forms.inc, line 253
Drupal forms of the Shibboleth authentication module.

Code

function shib_auth_admin_advanced() {
  $form = array();
  $form['shib_handler_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Advanced SAML2 settings'),
    '#weight' => 0,
    '#collapsible' => FALSE,
  );
  $form['shib_handler_settings']['shib_auth_is_passive'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable passive authentication'),
    '#description' => t('Enable passive authentication'),
    '#default_value' => shib_auth_config('is_passive'),
  );
  $form['shib_handler_settings']['shib_auth_forceauthn'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable forced authentication'),
    '#description' => t('Force users to re-authenticate'),
    '#default_value' => shib_auth_config('forceauthn'),
  );
  $form['shib_auth_auto_destroy_session'] = array(
    '#type' => 'fieldset',
    '#title' => t('Strict shibboleth session checking'),
    '#weight' => -2,
  );
  $form['shib_auth_auto_destroy_session']['shib_auth_auto_destroy_session'] = array(
    '#type' => 'checkbox',
    '#title' => t('Destroy Drupal session when the Shibboleth session expires.'),
    '#default_value' => shib_auth_config('auto_destroy_session'),
  );
  $form['shib_login_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Login settings'),
    '#weight' => -1,
  );
  $form['shib_login_settings']['shib_auth_login_url'] = array(
    '#type' => 'textfield',
    '#title' => t("URL to redirect to after login"),
    '#default_value' => shib_auth_config('login_url'),
    '#description' => t("The URL can be absolute or relative to the server base url. The relative paths will be automatically extended with the site base URL. If this value is empty than the user will be redirected to the originally requested page."),
  );
  $form['shib_logout_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Logout settings'),
    '#weight' => -1,
  );
  $form['shib_logout_settings']['shib_auth_logout_url'] = array(
    '#type' => 'textfield',
    '#title' => t("URL to redirect to after logout"),
    '#default_value' => shib_auth_config('logout_url'),
    '#description' => t("The URL can be absolute or relative to the server base url. The relative paths will be automatically extended with the site base URL. If you are using SLO, this setting is probably useless (depending on the IdP)"),
  );
  $form['shib_terms_conditions_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Terms of use settings'),
    '#weight' => -2,
    '#collapsible' => FALSE,
  );
  $form['shib_terms_conditions_settings']['shib_auth_terms_accept'] = array(
    '#type' => 'checkbox',
    '#title' => t('Force users to accept Terms of Use'),
    '#description' => t('Require acceptance of Terms of Use every time it changes'),
    '#default_value' => shib_auth_config('terms_accept'),
  );
  $form['shib_terms_conditions_settings']['shib_auth_terms_url'] = array(
    '#type' => 'textfield',
    '#title' => t('URL of the document'),
    '#default_value' => shib_auth_config('terms_url'),
    '#description' => t('Please refence local content with e.g. "node/1", or use an external link.'),
  );
  $form['shib_terms_conditions_settings']['shib_auth_terms_ver'] = array(
    '#type' => 'textfield',
    '#title' => t('Document version'),
    '#default_value' => shib_auth_config('terms_ver'),
    '#size' => 4,
  );
  return system_settings_form($form);
}