[java-plugin-shibd-oidc] 06/06: JavaDoc and checkstyle
Codeberg
noreply at shibboleth.net
Wed Aug 12 16:18:30 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch dev/JSHIBDOIDC-31-cred-resolver
in repository java-plugin-shibd-oidc.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-oidc/commit/9d2ac9de5b1d5a04f420d90407f58bb18462bf98
commit 9d2ac9de5b1d5a04f420d90407f58bb18462bf98
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Aug 12 17:16:16 2026 +0100
JavaDoc and checkstyle
---
.../navigate/ForceAuthnParameterLookupStrategy.java | 6 +++---
.../oidc/profile/config/navigate/package-info.java | 18 ++++++++++++++++++
.../context/navigate/IDTokenHintLookupStrategy.java | 3 ++-
.../impl/BasicSignatureSigningConfiguration.java | 2 +-
.../config/impl/ClientSecretCredentialResolver.java | 1 +
.../impl/StaticClientSecretCredentialResolver.java | 17 +++++++++++++++--
.../StaticFilteringCriterionCredentialResolver.java | 2 +-
.../impl/OIDCProviderMetadataLookupHandler.java | 2 +-
...alizeOAuth2ClientAuthenticationMethodHandler.java | 20 ++++++++++++--------
.../profile/impl/InitializeOAuth2ClientContext.java | 2 +-
10 files changed, 55 insertions(+), 18 deletions(-)
diff --git a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/ForceAuthnParameterLookupStrategy.java b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/ForceAuthnParameterLookupStrategy.java
index 0690312..6cb9d51 100644
--- a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/ForceAuthnParameterLookupStrategy.java
+++ b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/ForceAuthnParameterLookupStrategy.java
@@ -44,7 +44,8 @@ public class ForceAuthnParameterLookupStrategy extends AbstractAgentAndRelyingPa
@Nonnull private final Logger log = LoggerFactory.getLogger(ForceAuthnParameterLookupStrategy.class);
/** {@inheritDoc} */
- @Nullable public Boolean apply(final MessageContext messageCtx) {
+ @Override
+ @Nullable public Boolean apply(final MessageContext messageCtx) {
final DDF input = getDDF(messageCtx, DDFDirection.INPUT);
if (input == null) {
return null;
@@ -55,8 +56,7 @@ public class ForceAuthnParameterLookupStrategy extends AbstractAgentAndRelyingPa
if (isFeatureDisallowed(OIDCAuthorizationConfiguration.FEATURE_FORCEAUTHN, messageCtx)) {
log.warn("Agent disallowed from overriding ForceAuthn");
return false;
- }
- else if (forceAuthn == 1) {
+ } else if (forceAuthn == 1) {
return true;
}
}
diff --git a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/package-info.java b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/package-info.java
new file mode 100644
index 0000000..7c2af0f
--- /dev/null
+++ b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/config/navigate/package-info.java
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */
+
+/**
+ * Functions that navigate configuration profiles.
+ */
+package net.shibboleth.sp.oidc.profile.config.navigate;
\ No newline at end of file
diff --git a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/context/navigate/IDTokenHintLookupStrategy.java b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/context/navigate/IDTokenHintLookupStrategy.java
index d9c4e5f..fac832f 100644
--- a/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/context/navigate/IDTokenHintLookupStrategy.java
+++ b/sp-oidc-api/src/main/java/net/shibboleth/sp/oidc/profile/context/navigate/IDTokenHintLookupStrategy.java
@@ -62,7 +62,8 @@ public class IDTokenHintLookupStrategy extends AbstractAgentAndRelyingPartyConte
return null;
}
- final OIDCLogoutContext logoutContext = logoutContextLookupStrategy.apply(PRC_LOOKUP.apply(messageContext));
+ final OIDCLogoutContext logoutContext =
+ logoutContextLookupStrategy.apply(PRC_LOOKUP.apply(messageContext));
if (logoutContext != null && logoutContext.getIdToken() != null) {
return logoutContext.getIdToken();
}
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/BasicSignatureSigningConfiguration.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/BasicSignatureSigningConfiguration.java
index c7448b4..d9b0157 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/BasicSignatureSigningConfiguration.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/BasicSignatureSigningConfiguration.java
@@ -45,7 +45,7 @@ import net.shibboleth.shared.resolver.ResolverException;
* TODO: given the changes in oidc-commons, we could add something appropriate there.
*/
public class BasicSignatureSigningConfiguration
- extends net.shibboleth.oidc.security.jose.impl.BasicSignatureSigningConfiguration {
+ extends net.shibboleth.oidc.security.jose.impl.BasicSignatureSigningConfiguration {
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(BasicSignatureSigningConfiguration.class);
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/ClientSecretCredentialResolver.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/ClientSecretCredentialResolver.java
index 116cb44..654c653 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/ClientSecretCredentialResolver.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/ClientSecretCredentialResolver.java
@@ -68,6 +68,7 @@ public class ClientSecretCredentialResolver extends AbstractCriteriaFilteringCre
* Constructor.
*
* @param resolver credential resolver service
+ * @param requestSupplier the servlet request supplier
*/
public ClientSecretCredentialResolver(
@Nonnull @ParameterName(name="resolver") final ReloadableService<CredentialResolver> resolver,
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticClientSecretCredentialResolver.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticClientSecretCredentialResolver.java
index a31ade8..21de7cf 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticClientSecretCredentialResolver.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticClientSecretCredentialResolver.java
@@ -1,3 +1,16 @@
+/*
+ * 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.sp.jose.config.impl;
@@ -164,8 +177,8 @@ public class StaticClientSecretCredentialResolver extends AbstractOrderedCredent
return derivedCred;
} catch (final JOSEException e) {
- log.trace("Unable to derive symmetric encryption key from client_secret using 'alg={}' and 'enc={}'",
- alg.getAlgorithm(), enc.getEncAlgorithm());
+ log.trace("Unable to derive symmetric encryption key from client_secret using 'alg={}' "
+ + "and 'enc={}'", alg.getAlgorithm(), enc.getEncAlgorithm());
throw new ResolverException("Unable to create encryption key from client_secret", e);
}
} else {
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticFilteringCriterionCredentialResolver.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticFilteringCriterionCredentialResolver.java
index 66d2eb9..e293dc4 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticFilteringCriterionCredentialResolver.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/jose/config/impl/StaticFilteringCriterionCredentialResolver.java
@@ -57,7 +57,7 @@ import net.shibboleth.shared.resolver.ResolverException;
*
*/
public class StaticFilteringCriterionCredentialResolver extends AbstractCriteriaFilteringCredentialResolver
- implements JOSEObjectCredentialResolver {
+ implements JOSEObjectCredentialResolver {
/** List of credentials held by this resolver. */
@Nonnull private final CredentialResolver credentialResolver;
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/metadata/impl/OIDCProviderMetadataLookupHandler.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/metadata/impl/OIDCProviderMetadataLookupHandler.java
index 3afe327..b3908b5 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/metadata/impl/OIDCProviderMetadataLookupHandler.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/metadata/impl/OIDCProviderMetadataLookupHandler.java
@@ -103,7 +103,7 @@ public class OIDCProviderMetadataLookupHandler extends AbstractMessageHandler {
* @param resolver The resolver to use.
*/
public void setProviderMetadataResolver(@Nonnull final ProviderMetadataResolver resolver) {
- checkSetterPreconditions();
+ checkSetterPreconditions();
metadataResolverLookupStrategy = FunctionSupport.constant(
Constraint.isNotNull(resolver, "ProviderMetadataResolver cannot be null"));
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientAuthenticationMethodHandler.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientAuthenticationMethodHandler.java
index ade55f2..21628f6 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientAuthenticationMethodHandler.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientAuthenticationMethodHandler.java
@@ -196,8 +196,8 @@ public class InitializeOAuth2ClientAuthenticationMethodHandler extends AbstractM
* @param strategy the strategy.
*/
public void setProviderMetadataLookupStrategy(
- @Nonnull final Function<MessageContext, OIDCProviderMetadataContext> strategy) {
- checkSetterPreconditions();
+ @Nonnull final Function<MessageContext, OIDCProviderMetadataContext> strategy) {
+ checkSetterPreconditions();
providerMetadataLookupStrategy =
Constraint.isNotNull(strategy,"Provider metadata lookup strategy can not be null");
@@ -289,7 +289,8 @@ public class InitializeOAuth2ClientAuthenticationMethodHandler extends AbstractM
throw new MessageHandlerException("No OAuth2 client authentication context found or created");
}
- final RelyingPartyContext rpCtx = relyingPartyContextLookupStrategy.compose(PRC_LOOKUP).apply(messageContext);
+ final RelyingPartyContext rpCtx =
+ relyingPartyContextLookupStrategy.compose(PRC_LOOKUP).apply(messageContext);
if (rpCtx != null && rpCtx.getConfiguration() != null &&
rpCtx.getProfileConfig() instanceof final OIDCAuthenticationRelyingPartyProfileConfiguration
rpConfig) {
@@ -382,7 +383,8 @@ public class InitializeOAuth2ClientAuthenticationMethodHandler extends AbstractM
* secret and not a public key. These checks may also happen in the resolver, so this serves to guarantee that
* behaviour.</p>
*
- * TODO: When we have a way to signal a 'PASSWORD' usage type, the resolvers will know not to return assymmetric keys.
+ * TODO: When we have a way to signal a 'PASSWORD' usage type, the resolvers will know not to
+ * return assymmetric keys.
*
* @return the secret if found
*
@@ -393,11 +395,13 @@ public class InitializeOAuth2ClientAuthenticationMethodHandler extends AbstractM
try {
final CriteriaSet criteria = new CriteriaSet();
// Use the SIGNING type, to ensure direct key usage.
- // TODO: if another type is specified, we can just say RAW etc. This is a hack. It is really a 'PASSWORD'.
+ // TODO: if another type is specified, we can just say RAW etc. This is a hack. It is
+ // really a 'PASSWORD'.
criteria.add(new UsageCriterion(UsageType.SIGNING));
// Return the first that fits
for (final Credential secret : clientSecretResolver.resolve(criteria)) {
- // Guard we have a secret for the correct provider (even if filtered by the resolver), and is a secret
+ // Guard we have a secret for the correct provider (even if filtered by the resolver), and is
+ // a secret
// TODO: Maybe we guard on entityId, but for now that is not possible for the client_secret
// if (providerMetadata.getIssuer().getValue().equals(secret.getEntityId()) &&
// secret.getSecretKey() != null){
@@ -491,8 +495,8 @@ public class InitializeOAuth2ClientAuthenticationMethodHandler extends AbstractM
final String audience;
if (profileConfiguration.isUseTargetedEndpointAsJWTAudience(PRC_LOOKUP.apply(messageContext))) {
if (providerMetadata.getTokenEndpointURI() == null) {
- throw new MessageHandlerException("Token endpoint URI expected as the audience, but no token endpoint"
- + " exists in provider metadata");
+ throw new MessageHandlerException("Token endpoint URI expected as the audience, but no "
+ + "token endpoint exists in provider metadata");
}
audience = providerMetadata.getTokenEndpointURI().toString();
} else {
diff --git a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientContext.java b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientContext.java
index 01f6e12..eced088 100644
--- a/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientContext.java
+++ b/sp-oidc-impl/src/main/java/net/shibboleth/sp/oidc/profile/impl/InitializeOAuth2ClientContext.java
@@ -107,7 +107,7 @@ public class InitializeOAuth2ClientContext extends AbstractAgentAction {
*/
public void setOAuth2ClientContextLookupStrategy(
@Nonnull final Function<ProfileRequestContext, OAuth2ClientContext> strgy) {
- checkSetterPreconditions();
+ checkSetterPreconditions();
oauth2ClientContextLookupStrategy = Constraint.isNotNull(strgy,
"OAuth2 client context lookup strategy cannot be null");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list