Skip to content

Commit 574e38d

Browse files
jacobbednarzBalazs Dianiska
authored andcommitted
Issue #2386051 by jacobbednarz: Allow login path configurable
1 parent 7f5f506 commit 574e38d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

simplesamlphp_auth.admin.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ function simplesamlphp_auth_settings() {
4343
'#default_value' => variable_get('simplesamlphp_auth_authsource', 'default-sp'),
4444
'#description' => t('The name of the source to use from /var/simplesamlphp/config/authsources.php'),
4545
);
46+
$form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_login_path'] = array(
47+
'#type' => 'textfield',
48+
'#title' => t('Login path'),
49+
'#default_value' => variable_get('simplesamlphp_auth_login_path', 'saml_login'),
50+
'#description' => t('Path for logging into SAML - Do not include proceeding slash.'),
51+
);
4652
$form['simplesamlphp_auth_grp_setup']['simplesamlphp_auth_forcehttps'] = array(
4753
'#type' => 'checkbox',
4854
'#title' => t('Force https for login links'),

simplesamlphp_auth.module

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* Implements hook_menu().
3333
*/
3434
function simplesamlphp_auth_menu() {
35+
$login_path = variable_get('simplesamlphp_auth_login_path', 'saml_login');
3536
$items = array();
3637

3738
$items['admin/config/people/simplesamlphp_auth'] = array(
@@ -43,7 +44,7 @@ function simplesamlphp_auth_menu() {
4344
'file' => 'simplesamlphp_auth.admin.inc',
4445
'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
4546
);
46-
$items['saml_login'] = array(
47+
$items[$login_path] = array(
4748
'title' => 'Logon to the site',
4849
'description' => 'Provides a site login page',
4950
'page callback' => 'simplesamlphp_auth_loginpage',

0 commit comments

Comments
 (0)