[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/profile/saml2/Dec...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Feb 6 14:21:20 EST 2014
Author: scantor
Date: Thu Feb 6 14:21:20 2014
New Revision: 5326
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5326&view=rev
Log:
IDP-139 - Rework to use SecParamContext and DecryptionParameters, location TBD
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/DecryptNameIDs.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/DecryptNameIDsTest.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/DecryptNameIDs.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/DecryptNameIDs.java?rev=5326&r1=5325&r2=5326&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/DecryptNameIDs.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/DecryptNameIDs.java Thu Feb 6 14:21:20 2014
@@ -21,8 +21,6 @@
import javax.annotation.Nullable;
import net.shibboleth.idp.profile.AbstractProfileAction;
-import net.shibboleth.idp.profile.IdPEventIds;
-import net.shibboleth.idp.relyingparty.RelyingPartyContext;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -53,7 +51,8 @@
import org.opensaml.saml.saml2.core.SubjectConfirmation;
import org.opensaml.saml.saml2.core.SubjectQuery;
import org.opensaml.saml.saml2.encryption.Decrypter;
-import org.opensaml.xmlsec.DecryptionConfiguration;
+import org.opensaml.xmlsec.DecryptionParameters;
+import org.opensaml.xmlsec.context.SecurityParametersContext;
import org.opensaml.xmlsec.encryption.support.DecryptionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,8 +70,7 @@
*
* @event {@link EventIds#PROCEED_EVENT_ID}
* @event {@link EventIds#INVALID_MSG_CTX}
- * @event {@link IdPEventIds#INVALID_RELYING_PARTY_CTX}
- * @event {@link IdPEventIds#INVALID_PROFILE_CONFIG}
+ * @event {@link EventIds#INVALID_PROFILE_CTX}
* @event {@link SAMLEventIds#DECRYPT_NAMEID_FAILED}
*/
public class DecryptNameIDs extends AbstractProfileAction {
@@ -83,8 +81,8 @@
/** Are decryption failures a fatal condition? */
private boolean errorFatal;
- /** Strategy used to locate the {@link RelyingPartyContext}. */
- @Nonnull private Function<ProfileRequestContext, RelyingPartyContext> relyingPartyContextLookupStrategy;
+ /** Strategy used to locate the {@link SecurityParametersContext}. */
+ @Nonnull private Function<ProfileRequestContext, SecurityParametersContext> securityParamsLookupStrategy;
/** Strategy used to locate the SAML message to operate on. */
@Nonnull private Function<ProfileRequestContext, Object> messageLookupStrategy;
@@ -98,7 +96,7 @@
/** Constructor. */
public DecryptNameIDs() {
errorFatal = true;
- relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class, false);
+ securityParamsLookupStrategy = new ChildContextLookup<>(SecurityParametersContext.class, false);
messageLookupStrategy = Functions.compose(new MessageLookup(), new InboundMessageContextLookup());
}
@@ -114,18 +112,18 @@
}
/**
- * Set the strategy used to locate the {@link RelyingPartyContext} associated with a given
+ * Set the strategy used to locate the {@link SecurityParametersContext} associated with a given
* {@link ProfileRequestContext}.
*
- * @param strategy strategy used to locate the {@link RelyingPartyContext} associated with a given
+ * @param strategy strategy used to locate the {@link SecurityParametersContext} associated with a given
* {@link ProfileRequestContext}
*/
- public synchronized void setRelyingPartyContextLookupStrategy(
- @Nonnull final Function<ProfileRequestContext, RelyingPartyContext> strategy) {
+ public synchronized void setSecurityParametersContextLookupStrategy(
+ @Nonnull final Function<ProfileRequestContext, SecurityParametersContext> strategy) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
- relyingPartyContextLookupStrategy =
- Constraint.isNotNull(strategy, "RelyingPartyContext lookup strategy cannot be null");
+ securityParamsLookupStrategy =
+ Constraint.isNotNull(strategy, "SecurityParametersContext lookup strategy cannot be null");
}
/**
@@ -133,7 +131,7 @@
*
* @param strategy strategy used to locate the {@link SAMLObject} to operate on
*/
- public synchronized void setResponseLookupStrategy(
+ public synchronized void setMessageLookupStrategy(
@Nonnull final Function<ProfileRequestContext, Object> strategy) {
ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
@@ -153,29 +151,16 @@
return false;
}
[... 151 lines stripped ...]
More information about the commits
mailing list