You are here

function simplesamlphp_auth_settings_basic in simpleSAMLphp Authentication 7.3

Basic configuration form.

Shows the first page of SimpleSAMLphp Authentication's configuration.

Return value

array

1 string reference to 'simplesamlphp_auth_settings_basic'
simplesamlphp_auth_menu in ./simplesamlphp_auth.module
Implements hook_menu().

File

./simplesamlphp_auth.admin.inc, line 15
Admin include file for admin settings form.

Code

function simplesamlphp_auth_settings_basic() {
  $form['simplesamlphp_auth_grp_setup'] = array(
    '#type' => 'fieldset',
    '#title' => t('Basic settings'),
    '#collapsible' => FALSE,
  );
  $form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_activate'] = array(
    '#type' => 'checkbox',
    '#title' => t('Activate authentication via SimpleSAMLphp'),
    '#default_value' => variable_get('simplesamlphp_auth_activate', FALSE),
    '#description' => t('Checking this box before configuring the module could lock you out of Drupal.'),
  );
  $form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_installdir'] = array(
    '#type' => 'textfield',
    '#title' => t('Installation directory (default: /usr/share/simplesamlphp)'),
    '#default_value' => variable_get('simplesamlphp_auth_installdir', '/usr/share/simplesamlphp'),
    '#description' => t('The base directory of simpleSAMLphp. Absolute path with no trailing slash.'),
  );
  $form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_authsource'] = array(
    '#type' => 'textfield',
    '#title' => t('Authenticaton source for this SP (default: default-sp)'),
    '#default_value' => variable_get('simplesamlphp_auth_authsource', 'default-sp'),
    '#description' => t('The name of the source to use from /usr/share/simplesamlphp/config/authsources.php'),
  );
  $form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_login_link_display_name'] = array(
    '#type' => 'textfield',
    '#title' => t('Federated Log In Link Display Name'),
    '#default_value' => variable_get('simplesamlphp_auth_login_link_display_name', 'Federated Log In'),
    '#description' => t('Text to display as the link to the external federated login page. Default is "Federated Log In" and is passed through the core translation layer.'),
  );
  $form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_login_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Login path'),
    '#default_value' => variable_get('simplesamlphp_auth_login_path', 'saml_login'),
    '#description' => t('Path for logging into SAML - Do not include proceeding slash.'),
  );
  $form['simplesamlphp_auth_grp_debug'] = array(
    '#type' => 'fieldset',
    '#title' => t('Debugging'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['simplesamlphp_auth_grp_debug']['simplesamlphp_auth_debug'] = array(
    '#type' => 'checkbox',
    '#title' => t('Turn on debugging messages'),
    '#default_value' => variable_get('simplesamlphp_auth_debug', FALSE),
    '#description' => t('Expand the level of watchdog messages logged to include debugging information'),
  );
  $form['simplesamlphp_auth_grp_reg'] = array(
    '#type' => 'fieldset',
    '#title' => t('User Provisioning'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['simplesamlphp_auth_grp_reg']['simplesamlphp_auth_registerusers'] = array(
    '#type' => 'checkbox',
    '#title' => t('Register users (i.e., auto-provisioning)'),
    '#default_value' => variable_get('simplesamlphp_auth_registerusers', TRUE),
    '#description' => t("Determines whether or not the module should automatically create/register new Drupal accounts for users that authenticate using SimpleSAMLphp. Unless you've done some custom work to provision Drupal accounts with the necessary authmap entries you will want this checked. NOTE: If unchecked each user must already have been provisioned a Drupal account with an appropriate entry in the authmap table before logging in. Otherwise they will receive a notice and be denied access. Be aware that simply creating a Drupal account will not create the necessary entry in the authmap table."),
  );
  $form['#submit'][] = 'simplesamlphp_auth_settings_basic_submit';
  return system_settings_form($form);
}