[java-oidc-common] branch main updated: Add second claims validator lookup function.
Scott Cantor
cantor.2 at osu.edu
Mon Jan 24 18:02:50 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor 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=db79caed64ffd87664e83ff59223a014683ad7c0
The following commit(s) were added to refs/heads/main by this push:
new db79cae Add second claims validator lookup function.
db79cae is described below
commit db79caed64ffd87664e83ff59223a014683ad7c0
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Jan 24 13:02:47 2022 -0500
Add second claims validator lookup function.
---
.../IssuedClaimsValidatorLookupFunction.java | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/navigate/IssuedClaimsValidatorLookupFunction.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/navigate/IssuedClaimsValidatorLookupFunction.java
new file mode 100644
index 0000000..f2b4041
--- /dev/null
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/config/navigate/IssuedClaimsValidatorLookupFunction.java
@@ -0,0 +1,55 @@
+/*
+ * 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.oidc.profile.config.navigate;
+
+import javax.annotation.Nullable;
+
+import org.opensaml.profile.context.ProfileRequestContext;
+
+import net.shibboleth.idp.profile.config.ProfileConfiguration;
+import net.shibboleth.idp.profile.context.RelyingPartyContext;
+import net.shibboleth.idp.profile.context.navigate.AbstractRelyingPartyLookupFunction;
+import net.shibboleth.oidc.jwt.claims.ClaimsValidator;
+import net.shibboleth.oidc.profile.oauth2.config.AbstractOAuth2TokenValidatingConfiguration;
+
+/**
+ * A function that obtains
+ * {@link AbstractOAuth2TokenValidatingConfiguration#getIssuedClaimsValidator(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.1.0
+ */
+public class IssuedClaimsValidatorLookupFunction extends AbstractRelyingPartyLookupFunction<ClaimsValidator> {
+
+ /** {@inheritDoc} */
+ @Nullable public ClaimsValidator apply(@Nullable final ProfileRequestContext input) {
+ final RelyingPartyContext rpc = getRelyingPartyContextLookupStrategy().apply(input);
+ if (rpc != null) {
+ final ProfileConfiguration pc = rpc.getProfileConfig();
+ if (pc instanceof AbstractOAuth2TokenValidatingConfiguration) {
+ return ((AbstractOAuth2TokenValidatingConfiguration) pc).getIssuedClaimsValidator(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