[java-idp-plugin-vci] 03/05: preauthorized -> preAuthorized in methods names etc
Codeberg
noreply at shibboleth.net
Mon Sep 7 14:32:29 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch dev/FirstInstructions
in repository java-idp-plugin-vci.
View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-vci/commit/86f5705855e36083448670d299fa260325ea96a9
commit 86f5705855e36083448670d299fa260325ea96a9
Author: Janne Lauros <janne.lauros at csc.fi>
AuthorDate: Mon Sep 7 17:16:30 2026 +0300
preauthorized -> preAuthorized in methods names etc
---
.../profile/config/OpenIDVCIConfiguration.java | 14 ++++----
.../impl/AbstractOpenIDVCIConfiguration.java | 38 +++++++++++-----------
.../profile/impl/BuildCredentialOfferToken.java | 14 ++++----
.../idp/service/relying-party/postconfig.xml | 4 +--
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/openid-vci-api/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/OpenIDVCIConfiguration.java b/openid-vci-api/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/OpenIDVCIConfiguration.java
index 8989056..136d12f 100644
--- a/openid-vci-api/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/OpenIDVCIConfiguration.java
+++ b/openid-vci-api/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/OpenIDVCIConfiguration.java
@@ -80,26 +80,26 @@ public interface OpenIDVCIConfiguration extends ConditionalProfileConfiguration
*
* @return pre-authorized code length
*/
- @ConfigurationSetting(name = "preauthorizedCodeLength")
+ @ConfigurationSetting(name = "preAuthorizedCodeLength")
@Positive
@Nonnull
- Integer getPreauthorizedCodeLength(@Nullable final ProfileRequestContext profileRequestContext);
+ Integer getPreAuthorizedCodeLength(@Nullable final ProfileRequestContext profileRequestContext);
/**
- * Get pre-authorized lifetime.
+ * Get pre-authorized code lifetime.
*
* <p>
- * Defaults to 5 minutes.
+ * Defaults to 10 minutes.
* </p>
*
* @param profileRequestContext profile request context
*
- * @return pre-authorized lifetime
+ * @return pre-authorized code lifetime
*/
- @ConfigurationSetting(name = "preauthorizedCodeLifetime")
+ @ConfigurationSetting(name = "preAuthorizedCodeLifetime")
@Positive
@Nonnull
- Duration getPreauthorizedCodeLifetime(@Nullable final ProfileRequestContext profileRequestContext);
+ Duration getPreAuthorizedCodeLifetime(@Nullable final ProfileRequestContext profileRequestContext);
/**
* Get credential lifetime.
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/impl/AbstractOpenIDVCIConfiguration.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/impl/AbstractOpenIDVCIConfiguration.java
index 97281dd..6828d4f 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/impl/AbstractOpenIDVCIConfiguration.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/config/impl/AbstractOpenIDVCIConfiguration.java
@@ -40,11 +40,11 @@ public abstract class AbstractOpenIDVCIConfiguration extends AbstractOIDCSSOConf
/** Lookup function to supply pre-authorized code lifetime. */
@Nonnull
- private Function<ProfileRequestContext, Duration> preauthorizedCodeLifetimeLookupStrategy;
+ private Function<ProfileRequestContext, Duration> preAuthorizedCodeLifetimeLookupStrategy;
/** Lookup function to supply pre-authorized code length. */
@Nonnull
- private Function<ProfileRequestContext, Integer> preauthorizedCodeLengthLookupStrategy;
+ private Function<ProfileRequestContext, Integer> preAuthorizedCodeLengthLookupStrategy;
/** Lookup function to supply credential lifetime. */
@Nonnull
@@ -75,8 +75,8 @@ public abstract class AbstractOpenIDVCIConfiguration extends AbstractOIDCSSOConf
*/
protected AbstractOpenIDVCIConfiguration(@Nonnull @NotEmpty final String profileId) {
super(profileId);
- preauthorizedCodeLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofMinutes(10));
- preauthorizedCodeLengthLookupStrategy = FunctionSupport.constant(Integer.valueOf(0));
+ preAuthorizedCodeLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofMinutes(10));
+ preAuthorizedCodeLengthLookupStrategy = FunctionSupport.constant(Integer.valueOf(0));
credentialLifetimeLookupStrategy = FunctionSupport.constant(Duration.ofDays(180));
proofSignatureValidationConfigurationLookupStrategy = FunctionSupport.constant(null);
credentialSignatureSigningConfigurationLookupStrategy = FunctionSupport.constant(null);
@@ -88,35 +88,35 @@ public abstract class AbstractOpenIDVCIConfiguration extends AbstractOIDCSSOConf
@Override
@Positive
@Nonnull
- public Duration getPreauthorizedCodeLifetime(@Nullable final ProfileRequestContext profileRequestContext) {
- final Duration lifetime = preauthorizedCodeLifetimeLookupStrategy.apply(profileRequestContext);
+ public Duration getPreAuthorizedCodeLifetime(@Nullable final ProfileRequestContext profileRequestContext) {
+ final Duration lifetime = preAuthorizedCodeLifetimeLookupStrategy.apply(profileRequestContext);
Constraint.isTrue(lifetime != null && !lifetime.isZero() && !lifetime.isNegative(),
- "Access token lifetime must be greater than 0");
+ "Pre-authorized code lifetime must be greater than 0");
return lifetime;
}
/**
- * Set the lifetime of an pre-authorized code.
- *
- * @param lifetime lifetime of an pre-authorized code
+ * Set the lifetime of a pre-authorized code.
+ *
+ * @param lifetime lifetime of a pre-authorized code
*/
- public void setPreauthorizedCodeLifetime(@Positive @Nonnull final Duration lifetime) {
+ public void setPreAuthorizedCodeLifetime(@Positive @Nonnull final Duration lifetime) {
Constraint.isTrue(lifetime != null && !lifetime.isZero() && !lifetime.isNegative(),
- "Device code lifetime must be greater than 0");
+ "Pre-authorized code lifetime must be greater than 0");
- preauthorizedCodeLifetimeLookupStrategy = FunctionSupport.constant(lifetime);
+ preAuthorizedCodeLifetimeLookupStrategy = FunctionSupport.constant(lifetime);
}
/** {@inheritDoc} */
@Override
@Positive
@Nonnull
- public Integer getPreauthorizedCodeLength(@Nullable final ProfileRequestContext profileRequestContext) {
- final Integer codeLength = preauthorizedCodeLengthLookupStrategy.apply(profileRequestContext);
+ public Integer getPreAuthorizedCodeLength(@Nullable final ProfileRequestContext profileRequestContext) {
+ final Integer codeLength = preAuthorizedCodeLengthLookupStrategy.apply(profileRequestContext);
Constraint.isTrue(codeLength != null && (codeLength > 9 || codeLength == 0),
- "Preauthorized code length must be at least 10 or 0");
+ "Pre-authorized code length must be at least 10 or 0");
return codeLength;
}
@@ -126,11 +126,11 @@ public abstract class AbstractOpenIDVCIConfiguration extends AbstractOIDCSSOConf
*
* @param codeLength length of the pre-authorized code.
*/
- public void setPreauthorizedCodeLength(@Positive @Nonnull final Integer codeLength) {
+ public void setPreAuthorizedCodeLength(@Positive @Nonnull final Integer codeLength) {
Constraint.isTrue(codeLength != null && (codeLength > 9 || codeLength == 0),
- "Preauthorized code length must be at least 10 or 0");
+ "Pre-authorized code length must be at least 10 or 0");
- preauthorizedCodeLengthLookupStrategy = FunctionSupport.constant(codeLength);
+ preAuthorizedCodeLengthLookupStrategy = FunctionSupport.constant(codeLength);
}
/** {@inheritDoc} */
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/BuildCredentialOfferToken.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/BuildCredentialOfferToken.java
index 7a86678..1090b0f 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/BuildCredentialOfferToken.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/BuildCredentialOfferToken.java
@@ -83,7 +83,7 @@ public class BuildCredentialOfferToken extends AbstractProfileAction {
private Function<ProfileRequestContext, RelyingPartyContext> relyingPartyContextLookupStrategy;
/** Length of the pre-authorized code. */
- private long preauthorizedCodeLength;
+ private long preAuthorizedCodeLength;
/** lifetime of pre-authorized code. */
private Duration expiration;
@@ -203,8 +203,8 @@ public class BuildCredentialOfferToken extends AbstractProfileAction {
}
final ProfileConfiguration pc = rpCtx.getProfileConfig();
if (pc instanceof OpenIDVCIConfiguration) {
- preauthorizedCodeLength = ((OpenIDVCIConfiguration) pc).getPreauthorizedCodeLength(profileRequestContext);
- expiration = ((OpenIDVCIConfiguration) pc).getPreauthorizedCodeLifetime(profileRequestContext);
+ preAuthorizedCodeLength = ((OpenIDVCIConfiguration) pc).getPreAuthorizedCodeLength(profileRequestContext);
+ expiration = ((OpenIDVCIConfiguration) pc).getPreAuthorizedCodeLifetime(profileRequestContext);
} else {
log.error("{} No OpenID VCI profile configuration associated with this profile request", getLogPrefix());
ActionSupport.buildEvent(profileRequestContext, IdPEventIds.INVALID_RELYING_PARTY_CTX);
@@ -234,15 +234,15 @@ public class BuildCredentialOfferToken extends AbstractProfileAction {
ctx.getCredentialOfferTxCode());
String credentialOfferToken;
- if (preauthorizedCodeLength != 0) {
+ if (preAuthorizedCodeLength != 0) {
credentialOfferToken = idGeneratorLookupStrategy.apply(profileRequestContext).generateIdentifier();
- if (credentialOfferToken.length() <= preauthorizedCodeLength) {
+ if (credentialOfferToken.length() <= preAuthorizedCodeLength) {
log.error("{} Generated pre-authorization code length is {}, expected length by profile config is {}+1",
- getLogPrefix(), credentialOfferToken.length(), preauthorizedCodeLength);
+ getLogPrefix(), credentialOfferToken.length(), preAuthorizedCodeLength);
ActionSupport.buildEvent(profileRequestContext, IdPEventIds.INVALID_PROFILE_CONFIG);
return;
}
- credentialOfferToken = credentialOfferToken.substring(1, (int) preauthorizedCodeLength + 1);
+ credentialOfferToken = credentialOfferToken.substring(1, (int) preAuthorizedCodeLength + 1);
try {
log.info("Storing credential request {} per pre-authorized code {}", credentialRequest.serialize(),
credentialOfferToken);
diff --git a/openid-vci-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml b/openid-vci-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml
index 73c4936..4a3447e 100644
--- a/openid-vci-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml
+++ b/openid-vci-impl/src/main/resources/META-INF/net/shibboleth/idp/service/relying-party/postconfig.xml
@@ -18,8 +18,8 @@
<bean id="AbstractVCIProfile" abstract="true"
p:issuer="#{getObject('shibboleth.oidc.issuer')}"
- p:preauthorizedCodeLifetime="%{openidvci.preAuthorizedCode.defaultLifetime:PT10M}"
- p:preauthorizedCodeLength="%{openidvci.preAuthorizedCode.defaultLength:0}"
+ p:preAuthorizedCodeLifetime="%{openidvci.preAuthorizedCode.defaultLifetime:PT10M}"
+ p:preAuthorizedCodeLength="%{openidvci.preAuthorizedCode.defaultLength:0}"
p:tokenEndpointAuthMethods="%{idp.oidc.tokenEndpointAuthMethods:client_secret_basic,client_secret_post,client_secret_jwt,private_key_jwt}"
p:forcePKCE="%{idp.oidc.forcePKCE:false}"
p:allowPKCEPlain="%{idp.oidc.allowPKCEPlain:false}"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list