[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/profile/saml2/Add...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jan 9 19:02:58 EST 2014
Author: scantor
Date: Thu Jan 9 19:02:57 2014
New Revision: 5172
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5172&view=rev
Log:
IDP-194 - ported SAML 1 action
Added:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertion.java
- copied, changed from r5166, trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthenticationStatementToAssertion.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertionTest.java (with props)
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthenticationStatementToAssertion.java
Copied: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertion.java (from r5166, trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthenticationStatementToAssertion.java)
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertion.java?p2=trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertion.java&p1=trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthenticationStatementToAssertion.java&r1=5166&r2=5172&rev=5172&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthenticationStatementToAssertion.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertion.java Thu Jan 9 19:02:57 2014
@@ -17,26 +17,262 @@
package net.shibboleth.idp.saml.impl.profile.saml2;
+import java.security.Principal;
+
import javax.annotation.Nonnull;
-
-import net.shibboleth.idp.profile.AbstractProfileAction;
-
-import org.opensaml.profile.ProfileException;
+import javax.annotation.Nullable;
+
+import net.shibboleth.idp.authn.AbstractAuthenticationAction;
+import net.shibboleth.idp.authn.AuthenticationException;
+import net.shibboleth.idp.authn.AuthenticationResult;
+import net.shibboleth.idp.authn.AuthnEventIds;
+import net.shibboleth.idp.authn.context.AuthenticationContext;
+import net.shibboleth.idp.authn.context.RequestedPrincipalContext;
+import net.shibboleth.idp.authn.principal.DefaultPrincipalDeterminationStrategy;
+import net.shibboleth.idp.profile.IdPEventIds;
+
+import org.opensaml.profile.action.ActionSupport;
+import org.opensaml.profile.action.EventIds;
import org.opensaml.profile.context.ProfileRequestContext;
+import org.opensaml.profile.context.navigate.OutboundMessageContextLookup;
+
+import net.shibboleth.idp.relyingparty.RelyingPartyContext;
+import net.shibboleth.idp.saml.authn.principal.AuthnContextClassRefPrincipal;
+import net.shibboleth.idp.saml.authn.principal.AuthnContextDeclRefPrincipal;
+import net.shibboleth.idp.saml.profile.saml2.SAML2ActionSupport;
+import net.shibboleth.utilities.java.support.component.ComponentSupport;
+import net.shibboleth.utilities.java.support.logic.Constraint;
+
+import org.joda.time.DateTime;
+import org.opensaml.core.xml.XMLObjectBuilderFactory;
+import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
+import org.opensaml.messaging.context.navigate.ChildContextLookup;
+import org.opensaml.messaging.context.navigate.MessageLookup;
+import org.opensaml.saml.common.SAMLObjectBuilder;
+import org.opensaml.saml.saml2.core.Assertion;
+import org.opensaml.saml.saml2.core.AuthnContext;
+import org.opensaml.saml.saml2.core.AuthnStatement;
import org.opensaml.saml.saml2.core.Response;
-import org.springframework.webflow.execution.Event;
-import org.springframework.webflow.execution.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Function;
+import com.google.common.base.Functions;
/**
- *
+ * Action that builds an {@link AuthnStatement} and adds it to the {@link Response} returned by a lookup
+ * strategy, by default the message returned by {@link ProfileRequestContext#getOutboundMessageContext()}.
+ *
+ * <p>If the {@link Response} does not contain an {@link Assertion} one will be created and added to,
+ * otherwise the {@link AuthnStatement} will be added to first {@link Assertion} in the {@link Response},
+ * unless the option is set to preclude this.</p>
+ *
+ * <p>A constructed {@link Assertion} will have its ID, IssueInstant, Issuer, and Version properties set.
+ * The issuer is based on {@link net.shibboleth.idp.relyingparty.RelyingPartyConfiguration#getResponderEntityId()}.</p>
+ *
+ * <p>The {@link AuthnStatement} will have its authentication instant set, based on
+ * {@link AuthenticationResult#getAuthenticationInstant()} via {@link AuthenticationContext#getAuthenticationResult()}.
+ * The {@link AuthnContext} will be set via {@link RequestedPrincipalContext#getMatchingPrincipal()}, or via an injected
[... 212 lines stripped ...]
More information about the commits
mailing list