[java-plugin-shibd] branch main updated: Subclass of OpenSAML action to populate remoted servlet request.

Scott Cantor cantor.2 at osu.edu
Wed Apr 2 20:54:59 UTC 2025


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-plugin-shibd.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=7b9c8d1f48f6740c219784b1852cbdebba78519f

The following commit(s) were added to refs/heads/main by this push:
     new 7b9c8d1  Subclass of OpenSAML action to populate remoted servlet request.
7b9c8d1 is described below

commit 7b9c8d1f48f6740c219784b1852cbdebba78519f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Apr 2 16:54:56 2025 -0400

    Subclass of OpenSAML action to populate remoted servlet request.
---
 .../profile/impl/ValidateHttpServletRequest.java   | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/ValidateHttpServletRequest.java b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/ValidateHttpServletRequest.java
new file mode 100644
index 0000000..994c30e
--- /dev/null
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/profile/impl/ValidateHttpServletRequest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed 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 net.shibboleth.sp.profile.impl;
+
+import javax.annotation.Nonnull;
+
+import org.opensaml.profile.context.ProfileRequestContext;
+
+import net.shibboleth.sp.context.AgentRequestContext;
+import net.shibboleth.sp.messaging.RemotedHttpServletRequest;
+import net.shibboleth.sp.messaging.RemotedHttpServletRequestResponseContext;
+
+/**
+ * Subclass of OpenSAML {@link ValidateHttpServletRequest} action that wraps the execute step to
+ * stash off the {@link RemotedHttpServletRequest} from the {@link AgentRequestContext}.
+ */
+public class ValidateHttpServletRequest extends org.opensaml.profile.action.impl.ValidateHttpServletRequest {
+    
+    /** {@inheritDoc} */
+    @Override
+    protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
+        final AgentRequestContext agentRequestContext =
+                profileRequestContext.ensureSubcontext(AgentRequestContext.class);
+        
+        try {
+            RemotedHttpServletRequestResponseContext.loadCurrent(agentRequestContext.getRemotedHttpServletRequest(),
+                    agentRequestContext.getRemotedHttpServletResponse());
+            super.doExecute(profileRequestContext);
+        } finally {
+            RemotedHttpServletRequestResponseContext.clearCurrent();
+        }
+    }
+
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list