[java-oidc-common] 01/02: JCOMOIDC-130 - Add profile option to set header type parameter of client authentication JWTs
Henri Mikkonen
henri.mikkonen at iki.fi
Fri Jun 6 08:29:58 UTC 2025
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-oidc-common.
View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=785f7cf4972fe675ee03fa134fcb369c08aefb0a
commit 785f7cf4972fe675ee03fa134fcb369c08aefb0a
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Fri Jun 6 11:26:44 2025 +0300
JCOMOIDC-130 - Add profile option to set header type parameter of client authentication JWTs
https://shibboleth.atlassian.net/browse/JCOMOIDC-130
Lookup function for the profile configuration option
---
.../ClientAuthenticationJWTTypeLookupFunction.java | 53 ++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/navigate/ClientAuthenticationJWTTypeLookupFunction.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/navigate/ClientAuthenticationJWTTypeLookupFunction.java
new file mode 100644
index 0000000..d191c5c
--- /dev/null
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/navigate/ClientAuthenticationJWTTypeLookupFunction.java
@@ -0,0 +1,53 @@
+/*
+ * 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.oidc.profile.config.navigate;
+
+import javax.annotation.Nullable;
+
+import org.opensaml.profile.context.ProfileRequestContext;
+
+import net.shibboleth.profile.config.ProfileConfiguration;
+import net.shibboleth.profile.context.RelyingPartyContext;
+import net.shibboleth.profile.context.navigate.AbstractRelyingPartyLookupFunction;
+import net.shibboleth.oidc.profile.oauth2.config.OAuth2ClientAuthenticableClientProfileConfiguration;
+
+
+/**
+ * A function that returns
+ * {@link OAuth2ClientAuthenticableClientProfileConfiguration#getClientAuthenticationJWTType(ProfileRequestContext)}
+ * if such a profile is available from a {@link RelyingPartyContext} obtained via a lookup function,
+ * by default a child of the {@link ProfileRequestContext}.
+ *
+ * <p>If a specific setting is unavailable, a null value is returned.</p>
+ *
+ * @since 3.3.0
+ */
+public class ClientAuthenticationJWTTypeLookupFunction extends AbstractRelyingPartyLookupFunction<String> {
+
+ /** {@inheritDoc} */
+ @Override
+ @Nullable public String apply(@Nullable final ProfileRequestContext input) {
+ final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
+ if (rpc != null) {
+ final ProfileConfiguration pc = rpc.getProfileConfig();
+ if (pc instanceof OAuth2ClientAuthenticableClientProfileConfiguration ocacpc) {
+ return ocacpc.getClientAuthenticationJWTType(input);
+ }
+ }
+
+ return null;
+ }
+
+}
\ 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