In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

Commit 2cb3b70d authored by haemmer's avatar haemmer
Browse files

Implemented feature #311

parent c9fcee0f
......@@ -329,7 +329,10 @@ For category entries, only Type, (local) Name and Index are relevant.
1.14 - Metadata parsing now uses DOM XML for PHP5 instead of Simple XML
1.14 - Added the configuration option wayf_force_remember_for_session to
the Embedded WAYF on request of Wolgang Lierz from ETH Zurich. This
option allows setting the remember for session checkbox to true
- Metadata parsing now uses DOM XML for PHP5 instead of Simple XML
- Fixed a minor HTML error in template for Embedded WAYF
- Sorting within categories works now correctly if SAML2 metadata is
used to generate Identity Provider drop-down list. Thanks to Prof.
......@@ -49,6 +49,15 @@ var wayf_height = "auto";
// [Optional, default: true]
var wayf_show_remember_checkbox = true;
// Force the user's Home Organisation selection to be remembered for the
// current browser session. If wayf_show_remember_checkbox is true
// the checkbox will be shown but will be read only.
// WARNING: Only use this feature if you know exactly what you are doing
// This option will cause problems that are difficult to find
// in case they accidentially select a wrong Home Organisation
// [Optional, false]
var wayf_force_remember_for_session = true;
// Logo size
// Choose whether the small or large logo shall be used
// [Optional, default: true]
......@@ -100,7 +109,6 @@ var wayf_show_categories = true;
// [Optional, commented out by default]
// var wayf_hide_categories = new Array();
// EntityIDs of Identity Provider whose category is hidden but that shall be shown anyway
// If this array is not empty, wayf_show_categories will be disabled because
// otherwise, unhidden IdPs may be displayed in the wrong category
......@@ -115,8 +123,6 @@ var wayf_show_categories = true;
// [Optional, commented out by default]
// var wayf_hide_idps = new Array();
//////////////////// ADVANCED SETTINGS ////////////////////
// Use the SAML2/Shibboleth 2 Discovery Service protocol where
......@@ -5,6 +5,13 @@
* Configuration parameters are specified in config.php.
// Check configuration
if (!isset($metadataSPFile)){
$errorMsg = 'Please first define a file $metadataSPFile = \'SProvider.metadata.conf.php\'; in config.php before running this script.';
syslog(LOG_ERR, $errorMsg);
// Make sure this script is not accessed directly
// Run in cli mode.
......@@ -164,6 +171,8 @@ function isRunViaInclude(){
// Processes an IDPRoleDescriptor XML node and returns an IDP entry or false if
// something went wrong
function processIDPRoleDescriptor($IDPRoleDescriptorNode){
global $defaultLanguage;
$IDP = Array();
// Get SSO URL
......@@ -299,6 +299,7 @@ var wayf_hide_categories;
var wayf_hide_idps;
var wayf_unhide_idps;
var wayf_show_remember_checkbox;
var wayf_force_remember_for_session;
var wayf_additional_idps;
var wayf_sp_samlDSURL;
var wayf_sp_samlACURL;
......@@ -637,6 +638,13 @@ function decodeBase64(input) {
wayf_show_remember_checkbox = true;
typeof(wayf_force_remember_for_session) == "undefined"
|| typeof(wayf_force_remember_for_session) != "boolean"
wayf_force_remember_for_session = false;
typeof(wayf_auto_login) == "undefined"
|| typeof(wayf_auto_login) != "boolean"
......@@ -985,7 +993,15 @@ SCRIPT;
// Do we have to show the remember settings checkbox?
if (wayf_show_remember_checkbox){
writeHTML('<input id="wayf_remember_checkbox" type="checkbox" name="session" value="true" {$checkedBool}>&nbsp;');
// Is the checkbox forced to be checked
if (wayf_force_remember_for_session){
// First draw the dummy checkbox ...
writeHTML('<input id="wayf_remember_checkbox" type="checkbox" name="session_dummy" value="true" checked="checked" disabled="disabled" >&nbsp;');
// ... and now the real but hidden checkbox
writeHTML('<input type="hidden" name="session" value="true">&nbsp;');
} else {
writeHTML('<input id="wayf_remember_checkbox" type="checkbox" name="session" value="true" {$checkedBool}>&nbsp;');
// Do we have to display custom text?
if(typeof(wayf_overwrite_checkbox_label_text) == "undefined"){
......@@ -994,6 +1010,9 @@ SCRIPT;
} else if (wayf_overwrite_checkbox_label_text != "") {
writeHTML('<label for="wayf_remember_checkbox" id="wayf_remember_checkbox_label" style="min-width:80px; font-size:' + wayf_font_size + 'px;color:' + wayf_font_color + ';">' + wayf_overwrite_checkbox_label_text + '</label>');
} else if (wayf_force_remember_for_session){
// Is the checkbox forced to be checked but hidden
writeHTML('<input id="wayf_remember_checkbox" type="hidden" name="session" value="true">&nbsp;');
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