[java-plugin-shibd-oidc] branch main updated: Null issue, unused code removal.

Codeberg noreply at shibboleth.net
Thu May 7 15:10:40 UTC 2026


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

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

View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-oidc/commit/f0af3f3663777e7dcf9f184d006b1e55a308fc08

The following commit(s) were added to refs/heads/main by this push:
     new f0af3f3  Null issue, unused code removal.
f0af3f3 is described below

commit f0af3f3663777e7dcf9f184d006b1e55a308fc08
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Thu May 7 11:10:31 2026 -0400

    Null issue, unused code removal.
---
 .../oidc/profile/AuthenticationRequestStateData.java | 11 +++++++----
 .../sp/oidc/profile/impl/BuildRequestObject.java     | 20 --------------------
 2 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/AuthenticationRequestStateData.java b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/AuthenticationRequestStateData.java
index ff0c047..af6404d 100644
--- a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/AuthenticationRequestStateData.java
+++ b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/AuthenticationRequestStateData.java
@@ -15,6 +15,7 @@
 package net.shibboleth.sp.oidc.profile;
 
 
+import java.net.URI;
 import java.time.Duration;
 import java.util.Objects;
 
@@ -25,6 +26,7 @@ import javax.annotation.concurrent.NotThreadSafe;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.MoreObjects;
+import com.nimbusds.openid.connect.sdk.Nonce;
 import com.nimbusds.openid.connect.sdk.OIDCClaimsRequest;
 import com.nimbusds.openid.connect.sdk.Prompt;
 import com.nimbusds.openid.connect.sdk.claims.ACR;
@@ -158,18 +160,19 @@ public class AuthenticationRequestStateData extends StateData {
      * 
      * @return a populated instance of this class
      */
-    @SuppressWarnings("null")
     public static AuthenticationRequestStateData from(
             @Nonnull final OIDCAuthenticationRequest request, @Nonnull final String authenticationAuthority) {
         
         // Specify OIDC specific information first
-        final AuthenticationRequestStateData state = new AuthenticationRequestStateData()            
-                .setNonce(request.getNonce() != null ? request.getNonce().getValue() : null)
+        final Nonce nonce = request.getNonce();
+        final URI redirect = request.getRedirectURI();
+        final AuthenticationRequestStateData state = new AuthenticationRequestStateData()
+                .setNonce(nonce != null ? nonce.getValue() : null)
                 .setPkceCodeVerifier(request.getCodeVerifier())
                 .setMaxAge(request.getMaxAge());
         // Now set the generic state information
         state.setAcrs(request.getAcrs().stream().filter(Objects::nonNull).map(ACR::getValue).toList())
-                .setResponseLocation(request.getRedirectURI() != null ? request.getRedirectURI().toString() : null)
+                .setResponseLocation(redirect != null ? redirect.toString() : null)
                 .setAuthenticationAuthority(authenticationAuthority)
                 .setIssuer(request.getClientID().getValue())
                 .setRequestTime(request.getAuthnRequestTime());
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/BuildRequestObject.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/BuildRequestObject.java
index 8a903a7..41b3225 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/BuildRequestObject.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/BuildRequestObject.java
@@ -47,7 +47,6 @@ import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
 import net.shibboleth.oidc.profile.core.OidcEventIds;
 import net.shibboleth.oidc.profile.encoding.AuthenticationContextClassReferenceSupport;
 import net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext;
-import net.shibboleth.profile.context.RelyingPartyContext;
 import net.shibboleth.shared.annotation.constraint.NonnullBeforeExec;
 import net.shibboleth.shared.logic.Constraint;
 import net.shibboleth.shared.logic.PredicateSupport;
@@ -78,9 +77,6 @@ public class BuildRequestObject extends AbstractProfileAction {
     /** Lookup strategy to locate the OpenID Provider metadata to use.*/
     @Nonnull private Function<ProfileRequestContext, OIDCProviderMetadataContext> providerMetadataLookupStrategy;
     
-    /** Lookup function for relying party context. */
-    @Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
-    
     /** A hook to allow additional checking of the request object claims after it is built.*/
     @Nonnull private Predicate<ClaimsSet> claimsSetIsValidPredicate;
     
@@ -109,7 +105,6 @@ public class BuildRequestObject extends AbstractProfileAction {
                 new ChildContextLookup<>(OIDCPeerEntityContext.class).compose(
                         new OutboundMessageContextLookup()));
         
-        relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
         // Create a no-op consumer
         customClaimsStrategy = (prc, set) -> {};
     }
@@ -128,21 +123,6 @@ public class BuildRequestObject extends AbstractProfileAction {
         }
     }
     
-    
-    /**
-     * Set the strategy used to locate the {@link RelyingPartyContext} associated with a given
-     * {@link ProfileRequestContext}.
-     * 
-     * @param strategy lookup strategy
-     */
-    public void setRelyingPartyContextLookupStrategy(
-            @Nonnull final Function<ProfileRequestContext,RelyingPartyContext> strategy) {
-    	checkSetterPreconditions();
-        
-        relyingPartyContextLookupStrategy =
-                Constraint.isNotNull(strategy, "RelyingPartyContext lookup strategy cannot be null");
-    }
-    
     /**
      * Set the lookup strategy to locate the OpenID providers metadata.
      * 

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


More information about the commits mailing list