[java-oidc-common] branch main updated: Annotation, javadoc, checkstyle issues.
Codeberg
noreply at shibboleth.net
Tue Mar 24 15:37:25 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-oidc-common.
View the commit online:
https://codeberg.org/Shibboleth/java-oidc-common/commit/46c3fe676ce989271241d56933dd7a9036f80642
The following commit(s) were added to refs/heads/main by this push:
new 46c3fe67 Annotation, javadoc, checkstyle issues.
46c3fe67 is described below
commit 46c3fe676ce989271241d56933dd7a9036f80642
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Mar 24 11:37:13 2026 -0400
Annotation, javadoc, checkstyle issues.
---
.../config/impl/AbstractOIDCSSOConfiguration.java | 2 +-
.../DefaultOIDCAuthorizationConfiguration.java | 5 ++-
.../decoding/impl/UserInfoResponseDecoder.java | 2 +-
...nitializeOAuth2ClientAuthenticationContext.java | 8 ++--
...icationRequestParameterValueMessageHandler.java | 18 ++++-----
...uthenticationContextClassReferencesHandler.java | 5 ++-
.../handler/impl/AddLoginHintHandler.java | 6 ++-
.../messaging/handler/impl/AddMaxAgeHandler.java | 6 ++-
.../impl/AddPKCECodeVerifierAndChallenge.java | 3 +-
.../messaging/handler/impl/AddResourceHandler.java | 4 +-
.../handler/impl/AddResponseTypeHandler.java | 44 ++--------------------
.../handler/impl/AddUiLocalesHandler.java | 4 +-
.../impl/SetAuthenticationRequestTimeHandler.java | 9 +----
.../DefaultOAuth2TokenAudienceConfiguration.java | 2 +-
.../impl/DefaultOAuth2TokenConfiguration.java | 9 +++--
.../impl/HTTPPostAuthnResponseDecoderTest.java | 7 ++--
16 files changed, 49 insertions(+), 85 deletions(-)
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
index 5a34ad35..c7a4ea0e 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/AbstractOIDCSSOConfiguration.java
@@ -786,7 +786,7 @@ public abstract class AbstractOIDCSSOConfiguration extends AbstractOAuth2FlowAwa
/** {@inheritDoc} */
@Override
- public boolean shouldValidateAcrValue(final ProfileRequestContext profileRequestContext) {
+ public boolean shouldValidateAcrValue(@Nullable final ProfileRequestContext profileRequestContext) {
return shouldValidateAcrValue.test(profileRequestContext);
}
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/DefaultOIDCAuthorizationConfiguration.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/DefaultOIDCAuthorizationConfiguration.java
index 731b1d24..312b34a8 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/DefaultOIDCAuthorizationConfiguration.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/config/impl/DefaultOIDCAuthorizationConfiguration.java
@@ -1105,7 +1105,7 @@ public class DefaultOIDCAuthorizationConfiguration extends AbstractOIDCSSOConfig
/** {@inheritDoc} */
@Override
- public List<String> getResourceIndicators(final ProfileRequestContext profileRequestContext) {
+ @Nonnull public List<String> getResourceIndicators(@Nullable final ProfileRequestContext profileRequestContext) {
final List<String> resourceIndicators = resourceIndicatorsLookupStrategy.apply(profileRequestContext);
if (resourceIndicators != null) {
return CollectionSupport.copyToList(resourceIndicators);
@@ -1145,7 +1145,8 @@ public class DefaultOIDCAuthorizationConfiguration extends AbstractOIDCSSOConfig
/** {@inheritDoc} */
@Override
- public Map<String, Object> getRequestedClaims(final ProfileRequestContext profileRequestContext) {
+ @Nonnull public Map<String, Object> getRequestedClaims(
+ @Nullable final ProfileRequestContext profileRequestContext) {
final Map<String, Object> requestedClaims = requestedClaimsLookupStrategy.apply(profileRequestContext);
if (requestedClaims != null) {
return CollectionSupport.copyToMap(requestedClaims);
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/decoding/impl/UserInfoResponseDecoder.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/decoding/impl/UserInfoResponseDecoder.java
index 6a6c096e..97536dcb 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/decoding/impl/UserInfoResponseDecoder.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/decoding/impl/UserInfoResponseDecoder.java
@@ -141,7 +141,7 @@ public class UserInfoResponseDecoder extends AbstractJSONResponseDecoderFunction
/** {@inheritDoc} */
@Override
- protected String serializeMessageForLogging(final UserInfoResponse response) {
+ protected String serializeMessageForLogging(@Nullable final UserInfoResponse response) {
if (response == null) {
return null;
}
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/impl/InitializeOAuth2ClientAuthenticationContext.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/impl/InitializeOAuth2ClientAuthenticationContext.java
index 78994d55..b71df0aa 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/impl/InitializeOAuth2ClientAuthenticationContext.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/impl/InitializeOAuth2ClientAuthenticationContext.java
@@ -69,7 +69,7 @@ public class InitializeOAuth2ClientAuthenticationContext extends AbstractMessage
*/
public void setOAuth2ClientAuthenticationContextLookupStrategy(
@Nonnull final Function<MessageContext, OAuth2ClientAuthenticationContext> strgy) {
- checkSetterPreconditions();
+ checkSetterPreconditions();
oauth2ClientAuthenticationContextLookupStrategy = Constraint.isNotNull(strgy,
"OAuth2 client authentication context lookup strategy cannot be null");
@@ -77,7 +77,7 @@ public class InitializeOAuth2ClientAuthenticationContext extends AbstractMessage
@Override
- protected void doInvoke(final MessageContext messageContext) throws MessageHandlerException {
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final OAuth2ClientAuthenticationContext context =
oauth2ClientAuthenticationContextLookupStrategy.apply(messageContext);
@@ -89,6 +89,4 @@ public class InitializeOAuth2ClientAuthenticationContext extends AbstractMessage
log.debug("{} Initialized OAuth2 Client Authentication Context",getLogPrefix());
}
-
-
-}
+}
\ No newline at end of file
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AbstractAuthenticationRequestParameterValueMessageHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AbstractAuthenticationRequestParameterValueMessageHandler.java
index 5b9aed72..c7770846 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AbstractAuthenticationRequestParameterValueMessageHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AbstractAuthenticationRequestParameterValueMessageHandler.java
@@ -24,7 +24,6 @@ import org.opensaml.messaging.context.navigate.ChildContextLookup;
import org.opensaml.messaging.handler.AbstractMessageHandler;
import org.opensaml.messaging.handler.MessageHandlerException;
import org.opensaml.profile.context.navigate.ParentProfileRequestContextLookup;
-import org.slf4j.Logger;
import com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata;
@@ -33,7 +32,6 @@ import net.shibboleth.oidc.profile.core.OIDCAuthenticationRequest;
import net.shibboleth.oidc.profile.messaging.context.OIDCPeerEntityContext;
import net.shibboleth.shared.annotation.constraint.NonnullBeforeExec;
import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.primitive.LoggerFactory;
/**
* Base class for message handlers that process and apply values of OpenID Connect authentication request parameters.
@@ -48,7 +46,6 @@ import net.shibboleth.shared.primitive.LoggerFactory;
* <li>and the parameter value to be extracted and validated against
* the expected Java type.</li>
* </ul>
- * </p>
*
* @param <T> the authentication request parameter value type
*/
@@ -57,10 +54,6 @@ public abstract class AbstractAuthenticationRequestParameterValueMessageHandler<
/** Lookup function for parent ProfileRequestContext. */
@Nonnull protected static final ParentProfileRequestContextLookup<MessageContext> PRC_LOOKUP
= new ParentProfileRequestContextLookup<>();
-
- /** Class logger. */
- @Nonnull private final Logger log =
- LoggerFactory.getLogger(AbstractAuthenticationRequestParameterValueMessageHandler.class);
/** Strategy used to locate the {@link OIDCAuthenticationRequest}. */
@Nonnull private Function<MessageContext, OIDCAuthenticationRequest> authenticationRequestLookupStrategy;
@@ -68,7 +61,8 @@ public abstract class AbstractAuthenticationRequestParameterValueMessageHandler<
/** Lookup strategy to locate the OpenID Provider metadata to use.*/
@Nonnull private Function<MessageContext, OIDCProviderMetadataContext> providerMetadataLookupStrategy;
- @Nullable private Function<MessageContext, T> parameterValueLookupStrategy;
+ /** Lookup strategy for parameter value. */
+ @Nullable private Function<MessageContext,T> parameterValueLookupStrategy;
/** The authentication request parameter value type.*/
@Nonnull private Class<T> type;
@@ -80,7 +74,11 @@ public abstract class AbstractAuthenticationRequestParameterValueMessageHandler<
@NonnullBeforeExec private OIDCProviderMetadata providerMetadata;
- /** Constructor.*/
+ /**
+ * Constructor.
+ *
+ * @param valueType type of value returned by handler
+ */
protected AbstractAuthenticationRequestParameterValueMessageHandler(@Nonnull final Class<T> valueType) {
type = Constraint.isNotNull(valueType, "Authentication request parameter value type cannot be null");
authenticationRequestLookupStrategy = mc -> {
@@ -170,7 +168,7 @@ public abstract class AbstractAuthenticationRequestParameterValueMessageHandler<
*/
public void setAuthenticationRequestLookupStrategy(
@Nonnull final Function<MessageContext, OIDCAuthenticationRequest> strategy) {
- checkSetterPreconditions();
+ checkSetterPreconditions();
authenticationRequestLookupStrategy =
Constraint.isNotNull(strategy, "AuthenticationRequestLookupStrategy lookup strategy cannot be null");
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddAuthenticationContextClassReferencesHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddAuthenticationContextClassReferencesHandler.java
index 416112c2..37ab260a 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddAuthenticationContextClassReferencesHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddAuthenticationContextClassReferencesHandler.java
@@ -43,8 +43,9 @@ public class AddAuthenticationContextClassReferencesHandler
super((Class)List.class);
}
- @Override protected void doInvoke(@Nonnull final MessageContext messageContext)
- throws MessageHandlerException {
+ /** {@inheritDoc} */
+ @Override
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final List<ACR> acrs = getParameterValue(messageContext);
if (acrs != null) {
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddLoginHintHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddLoginHintHandler.java
index 54371548..9f9f21f1 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddLoginHintHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddLoginHintHandler.java
@@ -29,12 +29,16 @@ public class AddLoginHintHandler extends AbstractAuthenticationRequestParameterV
/** Logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(AddLoginHintHandler.class);
+ /**
+ * Constructor.
+ */
public AddLoginHintHandler() {
super(String.class);
}
+ /** {@inheritDoc} */
@Override
- protected void doInvoke(final MessageContext messageContext) throws MessageHandlerException {
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final String loginHint = getParameterValue(messageContext);
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddMaxAgeHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddMaxAgeHandler.java
index 59b6d0c4..d9630201 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddMaxAgeHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddMaxAgeHandler.java
@@ -31,12 +31,14 @@ public class AddMaxAgeHandler extends AbstractAuthenticationRequestParameterValu
/** Logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(AddMaxAgeHandler.class);
+ /** Constructor. */
public AddMaxAgeHandler() {
super(Duration.class);
}
- @Override protected void doInvoke(@Nonnull final MessageContext messageContext)
- throws MessageHandlerException {
+ /** {@inheritDoc} */
+ @Override
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final Duration maxAge = getParameterValue(messageContext);
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddPKCECodeVerifierAndChallenge.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddPKCECodeVerifierAndChallenge.java
index f6acab08..2f527e55 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddPKCECodeVerifierAndChallenge.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddPKCECodeVerifierAndChallenge.java
@@ -46,8 +46,9 @@ public class AddPKCECodeVerifierAndChallenge
super(PKCEOptions.class);
}
+ /** {@inheritDoc} */
@Override
- protected void doInvoke(final MessageContext messageContext) throws MessageHandlerException {
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final PKCEOptions pkceOptions = getParameterValue(messageContext);
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResourceHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResourceHandler.java
index 4ca2c91e..26cc75d6 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResourceHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResourceHandler.java
@@ -42,9 +42,9 @@ public class AddResourceHandler extends AbstractAuthenticationRequestParameterVa
super((Class)List.class);
}
+ /** {@inheritDoc} */
@Override
- protected void doInvoke(@Nonnull final MessageContext messageContext)
- throws MessageHandlerException {
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final List<URI> resources = getParameterValue(messageContext);
log.debug("{} Adding resource indicators '{}'", getLogPrefix(), resources);
getAuthenticationRequest().setResources(resources);
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResponseTypeHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResponseTypeHandler.java
index 77bfb62a..5d5d43d0 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResponseTypeHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddResponseTypeHandler.java
@@ -17,13 +17,11 @@ package net.shibboleth.oidc.profile.messaging.handler.impl;
import java.util.List;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opensaml.messaging.context.MessageContext;
import org.opensaml.messaging.handler.MessageHandlerException;
import org.slf4j.Logger;
-import com.nimbusds.oauth2.sdk.ResponseMode;
import com.nimbusds.oauth2.sdk.ResponseType;
import net.shibboleth.shared.primitive.LoggerFactory;
@@ -41,8 +39,9 @@ public class AddResponseTypeHandler extends AbstractAuthenticationRequestParamet
super(ResponseType.class);
}
- @Override protected void doInvoke(@Nonnull final MessageContext messageContext)
- throws MessageHandlerException {
+ /** {@inheritDoc} */
+ @Override
+ protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
final ResponseType responseType = getParameterValue(messageContext);
if (responseType == null){
@@ -75,39 +74,4 @@ public class AddResponseTypeHandler extends AbstractAuthenticationRequestParamet
}
}
-
- // Checkstyle: ReturnCount OFF
- /**
- * Parse the response_mode into a known {@link ResponseMode}.
- *
- * @param responseModeFromProfile the response_mode as a string
- *
- * @return the parsed {@link ResponseMode}, or {@literal null} if the input type is unknown
- */
- @Nullable private ResponseMode parseResponseMode(@Nullable final String responseModeFromProfile) {
-
- if (responseModeFromProfile == null) {
- return null;
- }
-
- if (responseModeFromProfile.equals(ResponseMode.FORM_POST.getValue())) {
- return ResponseMode.FORM_POST;
- } else if (responseModeFromProfile.equals(ResponseMode.FORM_POST_JWT.getValue())) {
- return ResponseMode.FORM_POST_JWT;
- } else if (responseModeFromProfile.equals(ResponseMode.QUERY.getValue())) {
- return ResponseMode.QUERY;
- } else if (responseModeFromProfile.equals(ResponseMode.FRAGMENT.getValue())) {
- return ResponseMode.FRAGMENT;
- } else if (responseModeFromProfile.equals(ResponseMode.FRAGMENT_JWT.getValue())) {
- return ResponseMode.FRAGMENT_JWT;
- } else if (responseModeFromProfile.equals(ResponseMode.JWT.getValue())) {
- return ResponseMode.JWT;
- } else if (responseModeFromProfile.equals(ResponseMode.QUERY_JWT.getValue())) {
- return ResponseMode.QUERY_JWT;
- } else {
- return null;
- }
- }
- // Checkstyle: ReturnCount ON
-
-}
+}
\ No newline at end of file
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddUiLocalesHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddUiLocalesHandler.java
index 6d071784..a35784ec 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddUiLocalesHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/AddUiLocalesHandler.java
@@ -34,14 +34,14 @@ import net.shibboleth.shared.primitive.LoggerFactory;
public class AddUiLocalesHandler extends AbstractAuthenticationRequestParameterValueMessageHandler<List<String>> {
/** Class logger. */
- @Nonnull
- private final Logger log = LoggerFactory.getLogger(AddUiLocalesHandler.class);
+ @Nonnull private final Logger log = LoggerFactory.getLogger(AddUiLocalesHandler.class);
/** Constructor.*/
public AddUiLocalesHandler() {
super((Class)List.class);
}
+ /** {@inheritDoc} */
@Override
protected void doInvoke(@Nonnull final MessageContext messageContext) throws MessageHandlerException {
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/SetAuthenticationRequestTimeHandler.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/SetAuthenticationRequestTimeHandler.java
index c6ea598d..50f03ff1 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/SetAuthenticationRequestTimeHandler.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/messaging/handler/impl/SetAuthenticationRequestTimeHandler.java
@@ -20,16 +20,11 @@ import javax.annotation.Nonnull;
import org.opensaml.messaging.context.MessageContext;
import org.opensaml.messaging.handler.MessageHandlerException;
-import org.slf4j.Logger;
-
-import net.shibboleth.shared.primitive.LoggerFactory;
/** Handler that adds the authentication request time to the authentication request.*/
-public class SetAuthenticationRequestTimeHandler extends AbstractAuthenticationRequestParameterValueMessageHandler<Instant> {
-
- /** Logger. */
- @Nonnull private final Logger log = LoggerFactory.getLogger(SetAuthenticationRequestTimeHandler.class);
+public class SetAuthenticationRequestTimeHandler
+ extends AbstractAuthenticationRequestParameterValueMessageHandler<Instant> {
/**
* Constructor.
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenAudienceConfiguration.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenAudienceConfiguration.java
index c6cd2aec..b4d2e7e8 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenAudienceConfiguration.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenAudienceConfiguration.java
@@ -313,7 +313,7 @@ public class DefaultOAuth2TokenAudienceConfiguration extends AbstractOAuth2Inter
/** {@inheritDoc} */
@Override
- public List<String> getResourceIndicators(final ProfileRequestContext profileRequestContext) {
+ @Nonnull public List<String> getResourceIndicators(@Nullable final ProfileRequestContext profileRequestContext) {
final List<String> resourceIndicators = resourceIndicatorsLookupStrategy.apply(profileRequestContext);
if (resourceIndicators != null) {
return CollectionSupport.copyToList(resourceIndicators);
diff --git a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenConfiguration.java b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenConfiguration.java
index 57916cc5..87bcfff1 100644
--- a/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenConfiguration.java
+++ b/oidc-common-profile-impl/src/main/java/net/shibboleth/oidc/profile/oauth2/config/impl/DefaultOAuth2TokenConfiguration.java
@@ -254,7 +254,7 @@ public class DefaultOAuth2TokenConfiguration extends AbstractOIDCSSOConfiguratio
/** {@inheritDoc} */
@Override
- public List<String> getResourceIndicators(final ProfileRequestContext profileRequestContext) {
+ @Nonnull public List<String> getResourceIndicators(@Nullable final ProfileRequestContext profileRequestContext) {
final List<String> resourceIndicators = resourceIndicatorsLookupStrategy.apply(profileRequestContext);
if (resourceIndicators != null) {
return CollectionSupport.copyToList(resourceIndicators);
@@ -263,8 +263,8 @@ public class DefaultOAuth2TokenConfiguration extends AbstractOIDCSSOConfiguratio
}
/**
- * Set the lookup strategy used to find the set of OAuth 2.0 resource indicators associated with the given profile
- * request context that specify the intended audiences for an OAuth 2.0 access token.
+ * Set the lookup strategy used to find the set of OAuth 2.0 resource indicators associated with the given
+ * profile request context that specify the intended audiences for an OAuth 2.0 access token.
*
* @param strategy the strategy to set.
*
@@ -277,7 +277,8 @@ public class DefaultOAuth2TokenConfiguration extends AbstractOIDCSSOConfiguratio
}
/**
- * Set the set of OAuth 2.0 resource indicators that specify the intended audiences for an OAuth 2.0 access token.
+ * Set the set of OAuth 2.0 resource indicators that specify the intended audiences for an OAuth 2.0 access
+ * token.
*
* @param resourceIndicators the set of resource indicators.
*
diff --git a/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/decoding/impl/HTTPPostAuthnResponseDecoderTest.java b/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/decoding/impl/HTTPPostAuthnResponseDecoderTest.java
index c513d322..e92b153d 100644
--- a/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/decoding/impl/HTTPPostAuthnResponseDecoderTest.java
+++ b/oidc-common-profile-impl/src/test/java/net/shibboleth/oidc/profile/decoding/impl/HTTPPostAuthnResponseDecoderTest.java
@@ -15,7 +15,6 @@
package net.shibboleth.oidc.profile.decoding.impl;
import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import java.time.Duration;
@@ -109,7 +108,7 @@ public class HTTPPostAuthnResponseDecoderTest {
assertTrue(((AuthenticationResponse) msg).getState().getValue().equals("91c28622815dd9a92ef7c984c74c9e39.65317332"));
assertTrue(((AuthenticationSuccessResponse) msg).getAuthorizationCode().getValue().equals("XSpej7DkB2WYcF1Gzth5CCHw6Oxf3gxR"));
final String logMessage = decoder.serializeMessageForLogging(msg);
- assertNotNull(logMessage);
+ assert logMessage != null;
assertTrue(logMessage.contains("access_token"));
assertTrue(logMessage.contains("code"));
assertTrue(logMessage.contains("token_type"));
@@ -165,7 +164,7 @@ public class HTTPPostAuthnResponseDecoderTest {
assertEquals(((AuthenticationErrorResponse) msg).getErrorObject().getCode(),"invalid_request");
assertEquals(((AuthenticationErrorResponse) msg).getErrorObject().getDescription(),"bad request");
final String logMessage = decoder.serializeMessageForLogging(msg);
- assertNotNull(logMessage);
+ assert logMessage != null;
assertTrue(logMessage.contains("code"));
assertTrue(logMessage.contains("description"));
}
@@ -192,7 +191,7 @@ public class HTTPPostAuthnResponseDecoderTest {
assertTrue(((AuthenticationResponse) msg).getState().getValue().equals("91c28622815dd9a92ef7c984c74c9e39.65317332"));
assertTrue(((AuthenticationSuccessResponse) msg).getAuthorizationCode().getValue().equals("XSpej7DkB2WYcF1Gzth5CCHw6Oxf3gxR"));
final String logMessage = decoder.serializeMessageForLogging(msg);
- assertNotNull(logMessage);
+ assert logMessage != null;
assertTrue(logMessage.contains("state"));
assertTrue(logMessage.contains("code"));
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list