[java-identity-provider COMMIT] /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/i...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Oct 9 18:56:16 EDT 2015
Author: putmanb
Date: Fri Oct 9 18:56:15 2015
New Revision: 7804
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7804&view=rev
Log:
IDP-672: Create Action(s) and supporting code to issue SAML 2 Assertions decorated for delegation
Update Assertion lookup strategy to decorate the first Assertion with an AuthnStatement.
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java?rev=7804&r1=7803&r2=7804&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java Fri Oct 9 18:56:15 2015
@@ -838,8 +838,13 @@
log.debug("Outbound Response contained no Assertions, nothing to decorate");
return Collections.emptyList();
} else {
- //TODO What should be approach when have 2+ Assertions? See other actions' options for details.
- log.debug("Found Assertion to decorate in outbound Response");
+ for (Assertion assertion : response.getAssertions()) {
+ if (!assertion.getAuthnStatements().isEmpty()) {
+ log.debug("Found Assertion with AuthnStatement to decorate in outbound Response");
+ return Collections.singletonList(assertion);
+ }
+ }
+ log.debug("Found no Assertion with AuthnStatement in outbound Response, returning first");
return Collections.singletonList(response.getAssertions().get(0));
}
} else {
More information about the commits
mailing list