Skip to content

Commit

Permalink
Fix Drupal coding standards. Closes #5.
Browse files Browse the repository at this point in the history
  • Loading branch information
unn authored and Balazs Dianiska committed Sep 28, 2014
1 parent 021edf7 commit 9adf7b8
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 165 deletions.
6 changes: 4 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ identity attribute values.
an SP visit: http://www.simplesamlphp.org.

IMPORTANT: Your SP must be configured to use something other than phpsession
for session storage (in config/config.php set store.type => 'memcache' or 'sql').
for session storage (in config/config.php set store.type => 'memcache'
or 'sql').

To use memcache session handling you must have memcached installed on your
server and PHP must have the memcache extension. For more information on
Expand All @@ -27,7 +28,8 @@ identity attribute values.

-- INSTALLATION --

Assuming the prerequisites have been met, installation of this module is just like any other Drupal module.
Assuming the prerequisites have been met, installation of this module is just
like any other Drupal module.

1) Download the module
2) Uncompress it
Expand Down
15 changes: 10 additions & 5 deletions simplesamlphp_auth.admin.inc
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<?php

/**
* @file
* Admin include file for admin settings form.
*/

/**
* Implements settings for the module.
*/
function simplesamlphp_auth_settings() {
global $_simplesamlphp_auth_saml_version, $base_url;

if (!empty($_simplesamlphp_auth_saml_version )) {
if (!empty($_simplesamlphp_auth_saml_version)) {
$ver = explode('.', $_simplesamlphp_auth_saml_version);
if ( !($ver[0] >= 1 && $ver[1] >= 5) ) {
if (!($ver[0] >= 1 && $ver[1] >= 5)) {
drupal_set_message(t("Please upgrade SimpleSAMLphp. You are using %ssp_version", array('%ssp_version' => $_simplesamlphp_auth_saml_version)), 'warning');
}
}
Expand Down Expand Up @@ -52,7 +57,7 @@ function simplesamlphp_auth_settings() {
);
$form['simplesamlphp_auth_grp_user']['simplesamlphp_auth_user_name'] = array(
'#type' => 'textfield',
'#title' => t('Which attribute from simpleSAMLphp should be used as user\'s name'),
'#title' => t("Which attribute from simpleSAMLphp should be used as user's name"),
'#default_value' => variable_get('simplesamlphp_auth_user_name', 'eduPersonPrincipalName'),
'#description' => t('Example: <i>eduPersonPrincipalName</i> or <i>displayName</i><br />If the attribute is multivalued, the first value will be used.'),
'#required' => TRUE,
Expand Down Expand Up @@ -93,7 +98,7 @@ function simplesamlphp_auth_settings() {
'#type' => 'checkbox',
'#title' => t('Register users (i.e., auto-provisioning)'),
'#default_value' => variable_get('simplesamlphp_auth_registerusers', TRUE),
'#description' => t('Determines wether 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.<br /><br />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.'),
'#description' => t("Determines wether 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['simplesamlphp_auth_grp_auth'] = array(
Expand Down Expand Up @@ -133,7 +138,7 @@ function simplesamlphp_auth_settings() {
'#type' => 'textfield',
'#title' => t('Optionally, specify a URL for users to go to after logging out'),
'#default_value' => variable_get('simplesamlphp_auth_logoutgotourl', ''),
'#description' => t('Example: ' . $base_url),
'#description' => t('Example: @base_url', array('@base_url' => $base_url)),
);

return system_settings_form($form);
Expand Down
1 change: 0 additions & 1 deletion simplesamlphp_auth.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name = simpleSAMLphp authentication
description = Allows users to authenticate to a remote SAML identity provider (IdP) via a locally configured SimpleSAMLphp service point (SP).
php = 5.1
core = 7.x
configure = admin/config/people/simplesamlphp_auth
Loading

0 comments on commit 9adf7b8

Please sign in to comment.