[js-embedded-discovery] 01/03: EDS-77 non-default values for policy parameter
Rod Widdowson
rdw at steadingsoftware.com
Thu Jan 19 10:01:47 EST 2017
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository js-embedded-discovery.
View the commit online:
http://git.shibboleth.net/view/?p=js-embedded-discovery.git;a=commit;h=55f9a51a6e511786c719dd2da380298e6152c9e4
commit 55f9a51a6e511786c719dd2da380298e6152c9e4
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jan 19 14:08:45 2017 +0000
EDS-77 non-default values for policy parameter
https://issues.shibboleth.net/jira/browse/EDS-77
Allow the user to configure:
this.allowableProtocols = ["urn:oasis:names:tc:SAML:profiles:SSO:idpdiscovery-protocol:single"];
(and so on) to broaden the allowed protocols. The default (no parmeterization) is as now.
---
src/javascript/idpselect.js | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/javascript/idpselect.js b/src/javascript/idpselect.js
index 6e2da56..87a9d42 100644
--- a/src/javascript/idpselect.js
+++ b/src/javascript/idpselect.js
@@ -304,7 +304,24 @@ function IdPSelectUI() {
}
}
}
- if (policy != 'urn:oasis:names:tc:SAML:profiles:SSO:idpdiscovery-protocol:single') {
+ // Test protocol
+ var allowableProtocols;
+ if (null == paramsSupplied.allowableProtocols) {
+ allowableProtocols = ["urn:oasis:names:tc:SAML:profiles:SSO:idpdiscovery-protocol:single"];
+ } else {
+ allowableProtocols = paramsSupplied.allowableProtocols;
+ }
+
+ var protocolOk = false;
+ for (var i = 0 ; i < allowableProtocols.length; i++) {
+ var protocol = allowableProtocols[i];
+ if (policy == protocol) {
+ protocolOk = true;
+ break;
+ }
+ }
+
+ if (!protocolOk) {
fatal(getLocalizedMessage('fatal.wrongProtocol'));
return false;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list