[java-opensaml] 02/16: Add convenience lookup class for parent ProfileRequestContext.
Brent Putman
putmanb at georgetown.edu
Sun Dec 17 00:08:12 EST 2017
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=978d5845b479c108f5d022f9f315c3548ead59e5
commit 978d5845b479c108f5d022f9f315c3548ead59e5
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Fri Sep 1 17:06:13 2017 -0400
Add convenience lookup class for parent ProfileRequestContext.
---
.../ParentProfileRequestContextLookup.java | 38 ++++++++++++++++++++++
.../impl/PopulateSignatureSigningParameters.java | 6 ++--
2 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/context/navigate/ParentProfileRequestContextLookup.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/context/navigate/ParentProfileRequestContextLookup.java
new file mode 100644
index 0000000..b1e2449
--- /dev/null
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/context/navigate/ParentProfileRequestContextLookup.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements. See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.opensaml.profile.context.navigate;
+
+import org.opensaml.messaging.context.BaseContext;
+import org.opensaml.messaging.context.navigate.RecursiveTypedParentContextLookup;
+import org.opensaml.profile.context.ProfileRequestContext;
+
+/**
+ * A convenience subtype of {@link RecursiveTypedParentContextLookup} which returns the {@link ProfileRequestContext}
+ * parent of the target {@link BaseContext}.
+ *
+ * @param <StartContext> type of starting context
+ */
+public class ParentProfileRequestContextLookup<StartContext extends BaseContext>
+ extends RecursiveTypedParentContextLookup<StartContext, ProfileRequestContext> {
+
+ /** Constructor. */
+ public ParentProfileRequestContextLookup() {
+ super(ProfileRequestContext.class);
+ }
+
+}
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/PopulateSignatureSigningParameters.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/PopulateSignatureSigningParameters.java
index eef132b..f3b91c2 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/PopulateSignatureSigningParameters.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/profile/impl/PopulateSignatureSigningParameters.java
@@ -23,15 +23,14 @@ import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import org.opensaml.messaging.context.MessageContext;
import org.opensaml.messaging.context.navigate.ChildContextLookup;
-import org.opensaml.messaging.context.navigate.RecursiveTypedParentContextLookup;
import org.opensaml.messaging.handler.MessageHandlerException;
import org.opensaml.profile.action.AbstractConditionalProfileAction;
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 org.opensaml.profile.context.navigate.ParentProfileRequestContextLookup;
import org.opensaml.saml.common.messaging.context.SAMLMetadataContext;
import org.opensaml.saml.common.messaging.context.SAMLPeerEntityContext;
import org.opensaml.xmlsec.SecurityConfigurationSupport;
@@ -187,8 +186,7 @@ public class PopulateSignatureSigningParameters extends AbstractConditionalProfi
};
}
- final Function<MessageContext, ProfileRequestContext> prcLookup =
- new RecursiveTypedParentContextLookup<>(ProfileRequestContext.class);
+ final ParentProfileRequestContextLookup prcLookup = new ParentProfileRequestContextLookup();
delegate = new org.opensaml.saml.common.binding.impl.PopulateSignatureSigningParameters();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list