Commit a95292b4 authored by Piers Harding's avatar Piers Harding
Browse files

Add SAML based SSO Login link



Bug #810302

Add a link to auth/saml if the SAML auth plugin is enabled
This appears on all login panels
(whitespace given back)
Switched to checking auth_instance
Moved login string to this commit
This appears on login diversion page

Change-Id: Ia8a799396a9f33bc0cc6e0c59549e2464253ca31
Signed-off-by: default avatarPiers Harding <piers@catalyst.net.nz>
parent 796798d9
......@@ -1016,6 +1016,9 @@ function auth_get_login_form() {
'register' => array(
'value' => '<div id="login-helplinks">' . '<a href="' . get_config('wwwroot') . 'forgotpass.php" tabindex="2">' . get_string('lostusernamepassword') . '</a></div>'
),
'loginsaml' => array(
'value' => ((count_records('auth_instance', 'authname', 'saml') == 0) ? '' : '<div id="login-helplinks"><a href="' . get_config('wwwroot') . 'auth/saml/" tabindex="2">' . get_string('login', 'auth.saml') . '</a></div>')
),
'login_submitted' => array(
'type' => 'hidden',
'value' => 1
......@@ -1568,7 +1571,10 @@ function auth_generate_login_form() {
'register' => array(
'value' => '<div id="login-helplinks">' . $registerlink
. '<a href="' . get_config('wwwroot') . 'forgotpass.php" tabindex="2">' . get_string('lostusernamepassword') . '</a></div>'
)
),
'loginsaml' => array(
'value' => ((count_records('auth_instance', 'authname', 'saml') == 0) ? '' : '<a href="' . get_config('wwwroot') . 'auth/saml/" tabindex="2">' . get_string('login', 'auth.saml') . '</a>')
),
)
)));
......
......@@ -40,6 +40,7 @@ $string['errormissinguserattributes'] = 'You seem to be authenticated but we did
$string['institutionattribute'] = 'Institution attribute (contains "%s")';
$string['institutionvalue'] = 'Institution value to check against attribute';
$string['institutionregex'] = 'Do partial string match with institution shortname';
$string['login'] = 'SSO Login';
$string['notusable'] = 'Please install the SimpleSAMLPHP SP libraries';
$string['samlfieldforemail'] = 'SSO field for Email';
$string['samlfieldforfirstname'] = 'SSO field for First Name';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment