[java-idp-oidc] 03/03: JCOMOIDC-41 - Move OIDC Signature Validation resolvers and parameter classes to commons
Henri Mikkonen
henri.mikkonen at iki.fi
Thu Jan 19 14:14:11 UTC 2023
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-idp-oidc.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=744e5a5b11ba78a76f12e816a1c899b269fc5f79
commit 744e5a5b11ba78a76f12e816a1c899b269fc5f79
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Thu Jan 19 16:11:26 2023 +0200
JCOMOIDC-41 - Move OIDC Signature Validation resolvers and parameter classes to commons
https://shibboleth.atlassian.net/browse/JCOMOIDC-41
Added request object update strategy needed by DecryptJWE.
---
.../navigate/RequestObjectUpdateStrategy.java | 49 ++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/context/navigate/RequestObjectUpdateStrategy.java b/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/context/navigate/RequestObjectUpdateStrategy.java
new file mode 100644
index 00000000..6e28faab
--- /dev/null
+++ b/idp-oidc-extension-api/src/main/java/net/shibboleth/idp/plugin/oidc/op/profile/context/navigate/RequestObjectUpdateStrategy.java
@@ -0,0 +1,49 @@
+/*
+ * 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 net.shibboleth.idp.plugin.oidc.op.profile.context.navigate;
+
+import java.util.function.BiConsumer;
+
+import javax.annotation.Nullable;
+
+import org.opensaml.profile.context.ProfileRequestContext;
+
+import com.nimbusds.jwt.JWT;
+
+import net.shibboleth.idp.plugin.oidc.op.messaging.context.OIDCAuthenticationResponseContext;
+
+/**
+ * Add the {@link JWT} back to the request object in the {@link OIDCAuthenticationResponseContext}.
+ *
+ * @since 3.4.0
+ */
+public class RequestObjectUpdateStrategy implements BiConsumer<ProfileRequestContext, JWT> {
+
+ /** {@inheritDoc} */
+ @Override
+ public void accept(@Nullable final ProfileRequestContext profileRequestContext, @Nullable final JWT jwt) {
+ if (profileRequestContext == null || profileRequestContext.getOutboundMessageContext() == null
+ || profileRequestContext.getSubcontext(OIDCAuthenticationResponseContext.class) == null) {
+ return;
+ }
+ final OIDCAuthenticationResponseContext oidcResponseCtx = profileRequestContext
+ .getOutboundMessageContext()
+ .getSubcontext(OIDCAuthenticationResponseContext.class);
+ oidcResponseCtx.setRequestObject(jwt);
+ }
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list