Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GIP RENATER
switch-wayf
Commits
fe226d0d
Commit
fe226d0d
authored
Oct 18, 2011
by
haemmer
Browse files
IdPs from other federations are now sorted alphabetically
parent
a91dc421
Changes
2
Hide whitespace changes
Inline
Side-by-side
default-embedded-wayf.php
View file @
fe226d0d
...
...
@@ -221,14 +221,16 @@ var wayf_show_categories = true;
// Whether to load Identity Providers from the Discovery Feed provided by
// the Service Provider. This feature might have to be activated on the SP.
// The loaded Identity Providers are added to the wayf_additional_idps.
// the Service Provider. The discovery feed feature might have to be activated
// on the SP first.
// The loaded Identity Providers are added to the wayf_additional_idps and the
// whole array will be sorted alphabetically
// [Optional, commented out by default]
// wayf_use_disco_feed = true;
//
var
wayf_use_disco_feed = true;
// URL where to load the Discovery Feed from in case wayf_use_disco_feed is true
// [Optional, commented out by default]
// wayf_discofeed_url = "/Shibboleth.sso/DiscoFeed";
//
var
wayf_discofeed_url = "/Shibboleth.sso/DiscoFeed";
//////////////////// ADDITIONAL CSS CUSTOMIZATIONS ////////////////////
...
...
templates.php
View file @
fe226d0d
...
...
@@ -565,6 +565,21 @@ function loadDiscoFeedIdPs(){
}
}
// Sorts Discofeed
function sortEntities(a, b){
var nameA = a.name.toLowerCase();
var nameB = b.name.toLowerCase();
if (nameA < nameB){
return -1;
}
if (nameA > nameB){
return 1;
}
return 0;
}
// Returns true if user is logged in
function isUserLoggedIn(){
...
...
@@ -1098,7 +1113,7 @@ SCRIPT;
echo
<<<SCRIPT
// Load additional IdPs from DiscoFeed if feature is enabled
if (wayf_use_disco_feed){
loadDiscoFeedIdPs();
loadDiscoFeedIdPs();
}
if (wayf_additional_idps.length > 0){
...
...
@@ -1107,7 +1122,10 @@ SCRIPT;
writeHTML('<optgroup label="{$otherFederationString}">');
}
// Show additional IdPs in the order they are defined
// Sort Array
wayf_additional_idps.sort(sortEntities)
// Show additional IdPs
for ( var i=0; i < wayf_additional_idps.length ; i++){
if (wayf_additional_idps[i]){
// Last used IdP is known because of local _saml_idp cookie
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment