[java-idp-plugin-oidc-rp] branch main updated: Syntax and Javadoc improvements. Remove unused class

Phil Smart philip.smart at jisc.ac.uk
Wed Apr 26 11:25:29 UTC 2023


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

philsmart pushed a commit to branch main
in repository java-idp-plugin-oidc-rp.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-oidc-rp.git;a=commit;h=3a83292eeee85baa1ea8c01ac2e0cd94113a078c

The following commit(s) were added to refs/heads/main by this push:
     new 3a83292  Syntax and Javadoc improvements. Remove unused class
3a83292 is described below

commit 3a83292eeee85baa1ea8c01ac2e0cd94113a078c
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Apr 26 12:25:26 2023 +0100

    Syntax and Javadoc improvements. Remove unused class
---
 .../rp/config/navigate/MaxAgeLookupFunction.java   |  4 +-
 .../config/navigate/RedirectUriLookupFunction.java |  4 +-
 .../rp/messaging/ResponseParsingException.java     | 67 ----------------------
 .../context/logic/IsCodeFlowPredicate.java         |  2 +-
 .../context/logic/IsHybridFlowPredicate.java       |  2 +-
 .../context/logic/IsImplicitFlowPredicate.java     |  2 +-
 .../logic/RequestObjectRequiredAndSupported.java   |  5 +-
 ...WTClaimsSetFromRequestObjectLookupFunction.java |  2 +-
 .../PayloadFromRequestObjectLookupFunction.java    |  2 +-
 .../authn/oidc/rp/messaging/package-info.java      | 21 -------
 .../ProxyAuthenticationFlowAuditExtractor.java     | 17 +++---
 .../oidc/rp/impl/AuthorizationController.java      |  5 +-
 .../oidc/rp/impl/DefaultClaimMergingStrategy.java  |  4 +-
 ...nitializeOAuth2ClientAuthenticationContext.java |  7 ---
 ...OutboundAuthorizationRequestMessageContext.java |  3 +-
 .../InitializeUnverifiedRelyingPartyContext.java   |  5 +-
 .../rp/impl/UnsupportedResponseTypeAction.java     | 10 ++--
 .../impl/ValidateAuthenticationResponseResult.java |  2 +-
 .../rp/impl/ValidateOAuthAccessTokenResponse.java  |  2 +-
 .../authn/oidc/rp/impl/ValidateTokenClaims.java    |  4 +-
 .../rp/impl/ValidateUserInfoJSONObjectClaims.java  |  7 +--
 .../plugin/authn/oidc/rp/impl/package-info.java    |  1 -
 ...henticationRequestNonceClaimLookupStrategy.java |  2 +-
 23 files changed, 43 insertions(+), 137 deletions(-)

diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/MaxAgeLookupFunction.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/MaxAgeLookupFunction.java
index 99795b1..d17aedc 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/MaxAgeLookupFunction.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/MaxAgeLookupFunction.java
@@ -81,8 +81,8 @@ public class MaxAgeLookupFunction extends AbstractRelyingPartyLookupFunction<Dur
     @Nonnull
     public Duration apply(@Nullable final ProfileRequestContext input) {
         
-        // Max_age from authentication request is authoritative over that from the profile config. If it exists in the 
-        // profile config it should have already been set on the authentication request.
+        // Max_age from authentication request is authoritative over that from the profile config. Although if it 
+        // exists in the profile config it should have already been set on the authentication request.
         
         final OIDCAuthenticationRequest authnRequest = authenticationRequestLookupStrategy.apply(input);
         if (authnRequest != null && authnRequest.getMaxAge() != null) {
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/RedirectUriLookupFunction.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/RedirectUriLookupFunction.java
index 06ee9ed..429bcb4 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/RedirectUriLookupFunction.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/config/navigate/RedirectUriLookupFunction.java
@@ -48,9 +48,7 @@ public class RedirectUriLookupFunction extends AbstractRelyingPartyLookupFunctio
                     return null;
                 }
             } 
-        }
-        
+        }        
         return null;
     }
-
 }
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/ResponseParsingException.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/ResponseParsingException.java
deleted file mode 100644
index 12ae734..0000000
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/ResponseParsingException.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.authn.oidc.rp.messaging;
-
-/** An exception that indiciates an error whilst parsing an OIDC/OAuth response.*/
-public class ResponseParsingException extends Exception {
-
-    /** Serial UID. */
-    private static final long serialVersionUID = -1380145079985783546L;
-
-    /** Constructor. */
-    public ResponseParsingException() {
-        super();
-
-    }
-
-    /**
-     * Constructor.
-     * 
-     * @param message
-     *            exception message
-     * @param cause
-     *            exception to be wrapped by this one
-     */
-    public ResponseParsingException(final String message, final Throwable cause) {
-        super(message, cause);
-
-    }
-
-    /**
-     * Constructor.
-     * 
-     * @param message
-     *            exception message
-     */
-    public ResponseParsingException(final String message) {
-        super(message);
-
-    }
-
-    /**
-     * Constructor.
-     * 
-     * @param cause
-     *            exception to be wrapped by this one
-     */
-    public ResponseParsingException(final Throwable cause) {
-        super(cause);
-
-    }
-
-}
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsCodeFlowPredicate.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsCodeFlowPredicate.java
index bf588c4..22dcf92 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsCodeFlowPredicate.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsCodeFlowPredicate.java
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
 
 /** 
- * A predicate that determines if the flow is a 'code-flow' using the AuthenticationRequest that is inside
+ * A predicate that determines if the flow is a 'code-flow' using the Authentication Request that is inside
  * the message context.
  */
 public class IsCodeFlowPredicate implements Predicate<MessageContext> {
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsHybridFlowPredicate.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsHybridFlowPredicate.java
index 86f304d..8716f53 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsHybridFlowPredicate.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsHybridFlowPredicate.java
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
 
 /** 
- * A predicate that determines if the flow is a 'hybrid-flow' using the AuthenticationRequest that is inside
+ * A predicate that determines if the flow is a 'hybrid-flow' using the Authentication Request that is inside
  * the message context.
  */
 public class IsHybridFlowPredicate implements Predicate<MessageContext> {
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsImplicitFlowPredicate.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsImplicitFlowPredicate.java
index ff5ee61..90e6e94 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsImplicitFlowPredicate.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/IsImplicitFlowPredicate.java
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
 
 /** 
- * A predicate that determines if the flow is a 'implicit-flow' using the AuthenticationRequest that is inside
+ * A predicate that determines if the flow is a 'implicit-flow' using the Authentication Request that is inside
  * the message context.
  */
 public class IsImplicitFlowPredicate implements Predicate<MessageContext> {
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/RequestObjectRequiredAndSupported.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/RequestObjectRequiredAndSupported.java
index 1333e94..629aaf6 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/RequestObjectRequiredAndSupported.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/logic/RequestObjectRequiredAndSupported.java
@@ -36,7 +36,10 @@ import net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext;
 import net.shibboleth.oidc.profile.config.OIDCAuthenticationRelyingPartyProfileConfiguration;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
-/** Tests whether a request object should be built, and if it is supported by the upstream OP.*/
+/** 
+ * A predicate that tests whether a request object should be built based on what is configured in the profile 
+ * configuration and whether the OP supports it.  
+ */
 public class RequestObjectRequiredAndSupported extends AbstractRelyingPartyPredicate {
     
     /** Class logger. */
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/JWTClaimsSetFromRequestObjectLookupFunction.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/JWTClaimsSetFromRequestObjectLookupFunction.java
index b16dba8..19530e6 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/JWTClaimsSetFromRequestObjectLookupFunction.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/JWTClaimsSetFromRequestObjectLookupFunction.java
@@ -35,7 +35,7 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
 
 /** 
  * Extract the {@link Payload} from the Request Object inside the {@link OIDCAuthenticationRequest}. 
- * The Payload can either be signed, or plain.
+ * The Payload must either be signed, or plain. The claims will not be available if the payload is still encrypted.
  */
 public class JWTClaimsSetFromRequestObjectLookupFunction implements Function<MessageContext, JWTClaimsSet>{
     
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/PayloadFromRequestObjectLookupFunction.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/PayloadFromRequestObjectLookupFunction.java
index c197ba8..9d06189 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/PayloadFromRequestObjectLookupFunction.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/context/navigate/PayloadFromRequestObjectLookupFunction.java
@@ -37,7 +37,7 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
 
 /** 
  * Extract the {@link Payload} from the Request Object inside the {@link OIDCAuthenticationRequest}. 
- * The Payload can either be signed, or plain.
+ * The Payload must either be signed, or plain. The payload will not be available if still encrypted.
  */
 public class PayloadFromRequestObjectLookupFunction implements Function<MessageContext, Payload>{
     
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/package-info.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/package-info.java
deleted file mode 100644
index 1d18661..0000000
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/messaging/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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 that contains messaging related model objects.
- */
-package net.shibboleth.idp.plugin.authn.oidc.rp.messaging;
\ No newline at end of file
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/audit/impl/ProxyAuthenticationFlowAuditExtractor.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/audit/impl/ProxyAuthenticationFlowAuditExtractor.java
index 1845949..7826025 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/audit/impl/ProxyAuthenticationFlowAuditExtractor.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/audit/impl/ProxyAuthenticationFlowAuditExtractor.java
@@ -27,7 +27,7 @@ import org.opensaml.profile.context.ProfileRequestContext;
 import net.shibboleth.idp.authn.context.AuthenticationContext;
 
 /** 
- * {@link Function} that returns the authentication flow ID from the attempted flow of the
+ * A {@link Function} that returns the authentication flow ID from the attempted flow of the
  * parent context used to satisfy a request. Assuming the parent is an {@link AuthenticationContext}
  * as is the case in a proxy request.
  */
@@ -37,14 +37,15 @@ public class ProxyAuthenticationFlowAuditExtractor implements Function<ProfileRe
     @Override
     @Nullable public String apply(@Nullable final ProfileRequestContext input) {
 
-        final BaseContext baseContext = input.getParent();
-        if (baseContext instanceof AuthenticationContext) {
-            final AuthenticationContext authnCtx = (AuthenticationContext)baseContext;
-            if (authnCtx != null && authnCtx.getAttemptedFlow()!= null) {
-                return authnCtx.getAttemptedFlow().getId();
+        if (input != null) {
+            final BaseContext baseContext = input.getParent();
+            if (baseContext instanceof AuthenticationContext) {
+                final AuthenticationContext authnCtx = (AuthenticationContext)baseContext;
+                if (authnCtx.getAttemptedFlow()!= null) {
+                    return authnCtx.getAttemptedFlow().getId();
+                }
             }
-        }
-        
+        }        
         return null;
     }
     
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java
index b799f4a..dc75203 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/AuthorizationController.java
@@ -72,6 +72,9 @@ public class AuthorizationController extends AbstractInitializableComponent {
     /** The final part of the IdP URL path which is called to begin authorization.*/
     @Nonnull @NotEmpty public static final String AUTHORIZE_PATH_SEGMENT = "/authz";
     
+    /** The final part of the IdP URL path which is called to end authorization via the callback.*/
+    @Nonnull @NotEmpty public static final String CALLBACK_PATH_SEGMENT = "/callback";    
+    
     /** The name of the Http parameter that stores the authorisation code.*/
     @Nonnull @NotEmpty public static final String CODE_PARAMETER = "code";
     
@@ -236,7 +239,7 @@ public class AuthorizationController extends AbstractInitializableComponent {
      * @throws ExternalAuthenticationException throw if there is an error accepting the authz response.      
      * @throws IOException throw if there is an error accepting the authz response.
      */
-    @RequestMapping("/callback")
+    @RequestMapping(CALLBACK_PATH_SEGMENT)
     public void authorizationCallback(@Nonnull final HttpServletRequest httpRequest,
             @Nonnull final HttpServletResponse httpResponse) throws ExternalAuthenticationException, IOException {
         
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultClaimMergingStrategy.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultClaimMergingStrategy.java
index 75ae8d3..7131863 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultClaimMergingStrategy.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/DefaultClaimMergingStrategy.java
@@ -33,7 +33,7 @@ import com.nimbusds.openid.connect.sdk.claims.ClaimsSet;
  * A default merging strategy for combing claims in the UserInfo response with those from the id_token. 
  * <ol>
  * <li>If one of UserInfo or id_token claims are null, the other is returned.</li>
- * <li>If both input claims are null, an empty claimsset is returned.</li>
+ * <li>If both input claims are null, an empty claims set is returned.</li>
  * <li>Merges the id_token claims into the UserInfo claims, the value of a claim from the id_token
  * is taken over that from the UserInfo response if the claim keys clash.</li>
  * </ol>
@@ -66,7 +66,7 @@ public class DefaultClaimMergingStrategy implements BinaryOperator<ClaimsSet> {
         // Treat JSONObject as the base map representation.
         final Map<String, Object> userInfoClaimsAsMap = userInfo.toJSONObject();
         
-        // add UserInfo claims as a base
+        // Add UserInfo claims as a base
         final Map<String, Object> mergedClaimsMap = new HashMap<>(userInfoClaimsAsMap);
         
         // Merge id_token claims into userInfo claims, take id_token claim if conflict
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientAuthenticationContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientAuthenticationContext.java
index b8236df..4abe78a 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientAuthenticationContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOAuth2ClientAuthenticationContext.java
@@ -46,7 +46,6 @@ import net.shibboleth.idp.profile.context.RelyingPartyContext;
 import net.shibboleth.oidc.authn.context.OAuth2ClientAuthenticationContext;
 import net.shibboleth.oidc.profile.config.OIDCAuthenticationRelyingPartyProfileConfiguration;
 import net.shibboleth.oidc.security.credential.ClientSecretCredential;
-import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
@@ -60,7 +59,6 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
  * @event {@link IdPEventIds#INVALID_RELYING_PARTY_CONFIG}
  * @post Add the {@link ClientAuthenticationMethod} to the {@link OAuth2ClientAuthenticationContext}
  */
-//TODO simply some of these with a base class e.g. client context lookups.
 public class InitializeOAuth2ClientAuthenticationContext extends AbstractProfileAction {
 
     /** Class logger. */
@@ -96,11 +94,6 @@ public class InitializeOAuth2ClientAuthenticationContext extends AbstractProfile
         relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
 
     }
-
-    @Override
-    protected void doInitialize() throws ComponentInitializationException {
-        super.doInitialize();
-    }
     
     /**
      * Set lookup strategy for relying party context.
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOutboundAuthorizationRequestMessageContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOutboundAuthorizationRequestMessageContext.java
index c29befe..80dffd6 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOutboundAuthorizationRequestMessageContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeOutboundAuthorizationRequestMessageContext.java
@@ -42,7 +42,8 @@ import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
 /** 
- * Initialize an outbound message context ready for an authorization/authentication request to be built.
+ * Initialize an outbound message context with an OIDC peer entity context ready for an authorization/authentication 
+ * request to be built.
  * 
  * @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
  * @post ProfileRequestContext.getOutboundMessageContext(msgCtx != null
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeUnverifiedRelyingPartyContext.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeUnverifiedRelyingPartyContext.java
index d46e336..b933460 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeUnverifiedRelyingPartyContext.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/InitializeUnverifiedRelyingPartyContext.java
@@ -55,8 +55,8 @@ public class InitializeUnverifiedRelyingPartyContext extends AbstractProfileActi
     }
     
     /**
-     * Set the strategy used to return or create the {@link RelyingPartyContext}
-     * .
+     * Set the strategy used to return or create the {@link RelyingPartyContext}.
+     * 
      * @param strategy
      *            creation strategy
      */
@@ -68,7 +68,6 @@ public class InitializeUnverifiedRelyingPartyContext extends AbstractProfileActi
                 "RelyingPartyContext creation strategy cannot be null");
     }
     
-    /** {@inheritDoc} */
     @Override
     protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
 
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UnsupportedResponseTypeAction.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UnsupportedResponseTypeAction.java
index 55f3c3e..2e2cb42 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UnsupportedResponseTypeAction.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/UnsupportedResponseTypeAction.java
@@ -27,7 +27,11 @@ import org.slf4j.LoggerFactory;
 import net.shibboleth.idp.profile.AbstractProfileAction;
 import net.shibboleth.oidc.profile.core.OidcEventIds;
 
-/** Simple action to log the response from an unsupported grant type.*/
+/** 
+ * Simple action to log the response from an unsupported grant type.
+ * 
+ * @event {@link OidcEventIds.INVALID_RESPONSE_TYPE} 
+ */
 public class UnsupportedResponseTypeAction extends AbstractProfileAction {
     
     /** Class logger. */
@@ -37,9 +41,5 @@ public class UnsupportedResponseTypeAction extends AbstractProfileAction {
     protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
         log.error("{} Response type is not supported", getLogPrefix());
         ActionSupport.buildEvent(profileRequestContext, OidcEventIds.INVALID_RESPONSE_TYPE);
-        return;
     }
-    
-    
-
 }
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateAuthenticationResponseResult.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateAuthenticationResponseResult.java
index 74a3155..2c3eec6 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateAuthenticationResponseResult.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateAuthenticationResponseResult.java
@@ -35,7 +35,7 @@ import net.shibboleth.idp.authn.AbstractAuthenticationAction;
 import net.shibboleth.idp.authn.context.AuthenticationContext;
 
 /**
- * An action that checks the inbound authentication response indicated success, as opposed to an error.
+ * An action that checks the inbound authentication response indicated success as opposed to an error.
  *  
  * @event {@link EventIds#PROCEED_EVENT_ID}
  * @event {@link EventIds#INVALID_MSG_CTX}
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateOAuthAccessTokenResponse.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateOAuthAccessTokenResponse.java
index 2829cae..b292d73 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateOAuthAccessTokenResponse.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateOAuthAccessTokenResponse.java
@@ -111,7 +111,7 @@ public class ValidateOAuthAccessTokenResponse extends AbstractAuthenticationActi
             ActionSupport.buildEvent(profileRequestContext, OidcEventIds.INVALID_ACCESS_TOKEN);
             return;
         }
-        // Otherwise check is valid success response
+        // Otherwise check is valid success response parameters
         if (tokenResponse.getTokens().getAccessToken() == null) {
             log.warn("{} Access token response is invalid, no access_token found", getLogPrefix());
             ActionSupport.buildEvent(profileRequestContext, OidcEventIds.INVALID_ACCESS_TOKEN);
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java
index 0921547..d8aa01a 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateTokenClaims.java
@@ -125,7 +125,6 @@ public class ValidateTokenClaims extends AbstractAuthenticationAction {
         claimsValidator = Constraint.isNotNull(validator, "Claims validator cannot be null");
     }
     
-    /** {@inheritDoc} */
     @Override
     protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) {
@@ -149,8 +148,7 @@ public class ValidateTokenClaims extends AbstractAuthenticationAction {
         }        
         return true;
     }
-    
-    /** {@inheritDoc} */
+
     @Override
     protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) {
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateUserInfoJSONObjectClaims.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateUserInfoJSONObjectClaims.java
index 919bbb3..4b940a0 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateUserInfoJSONObjectClaims.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/ValidateUserInfoJSONObjectClaims.java
@@ -48,6 +48,7 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
 /**
  * Validate a successful UserInfo JSON Object Response according to section 5.3.2 of OpenID Connect Core 1.0. 
  * 
+ * @pre <pre>ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null</pre>
  * @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
  * @event {@link OidcEventIds#INVALID_USERINFO_CLAIMS}
  * @event {@link EventIds#INVALID_PROFILE_CTX}
@@ -58,12 +59,10 @@ public class ValidateUserInfoJSONObjectClaims extends AbstractAuthenticationActi
     @Nonnull private final Logger log = LoggerFactory.getLogger(ValidateUserInfoJSONObjectClaims.class);
     
     /** Strategy used to look up the {@link UserInfoResponseContext}. */
-    @Nonnull private Function<ProfileRequestContext, UserInfoResponseContext> 
-            userInfoResponseContextLookupStrategy;
+    @Nonnull private Function<ProfileRequestContext, UserInfoResponseContext> userInfoResponseContextLookupStrategy;
     
     /** Strategy used to look up the {@link AccessTokenResponseContext}. */
-    @Nonnull private Function<ProfileRequestContext, AccessTokenResponseContext> 
-            tokenResponseContextLookupStrategy;
+    @Nonnull private Function<ProfileRequestContext, AccessTokenResponseContext> tokenResponseContextLookupStrategy;
     
     /** The stashed user info response context.*/
     @Nullable private UserInfoResponseContext userInfoCtx; 
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/package-info.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/package-info.java
index 9cacce6..6d758f7 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/package-info.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/impl/package-info.java
@@ -18,5 +18,4 @@
 /**
  * This package has an authentication implementation for OpenID Connect authentication providers.
  */
-
 package net.shibboleth.idp.plugin.authn.oidc.rp.impl;
\ No newline at end of file
diff --git a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/security/impl/AuthenticationRequestNonceClaimLookupStrategy.java b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/security/impl/AuthenticationRequestNonceClaimLookupStrategy.java
index 183b977..e4ba941 100644
--- a/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/security/impl/AuthenticationRequestNonceClaimLookupStrategy.java
+++ b/idp-oidc-rp-impl/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/security/impl/AuthenticationRequestNonceClaimLookupStrategy.java
@@ -33,7 +33,7 @@ import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
 /** 
- * Find the nonce from the {@link OIDCAuthenticationRequest}. Returns null if not found.
+ * Lookup strategy that finds the nonce from the {@link OIDCAuthenticationRequest}. Returns {@code null} if not found.
  */
 @ThreadSafe
 public final class AuthenticationRequestNonceClaimLookupStrategy 

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


More information about the commits mailing list