diff --git a/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/AuthzeroTokenResolver.java b/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/AuthzeroTokenResolver.java index 01d3359..c2d83ce 100644 --- a/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/AuthzeroTokenResolver.java +++ b/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/AuthzeroTokenResolver.java @@ -45,11 +45,6 @@ import java.util.*; * resolver provides functionality to create, extract, verify, and renew JWT * tokens using various algorithms and custom payload data. *

- * Dependencies: - * This implementation relies on the {@code com.auth0:java-jwt} library. Please - * ensure you have added this library as a dependency to your project before - * using this resolver. - *

* Usage: * To use the {@code AuthzeroTokenResolver}, first, create an instance of this * class: @@ -87,7 +82,7 @@ import java.util.*; * correctly configured in your project's dependencies. * * @author Zihlu Wang - * @version 1.1.0 + * @version 1.1.1 * @see GuidCreator * @see Algorithm * @see JWTVerifier @@ -279,7 +274,7 @@ public class AuthzeroTokenResolver implements TokenResolver { builder.withClaim(name, v); } else { log.warn(""" - Unable to determine the type of field {}, converting it to a string now.""", name); + Unable to determine the type of field {}, we will handle it as a String.""", name); builder.withClaim(name, value.toString()); } } else { diff --git a/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/config/AuthzeroTokenResolverConfig.java b/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/config/AuthzeroTokenResolverConfig.java index 2cda8ea..1f0751a 100644 --- a/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/config/AuthzeroTokenResolverConfig.java +++ b/simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/config/AuthzeroTokenResolverConfig.java @@ -35,19 +35,20 @@ import java.util.function.Function; * the {@link AuthzeroTokenResolver}. *

* This configuration is used to establish the mapping between the standard - * {@link TokenAlgorithm} defined within the {@link AuthzeroTokenResolver} - * facade and the specific algorithms used by the {@code com.auth0:java-jwt} - * library, which is the underlying library used by {@link - * AuthzeroTokenResolver} to handle JSON Web Tokens (JWTs). + * {@link TokenAlgorithm} defined in the + * {@code cn.org.codecrafters:simple-jwt-facade} and the specific algorithms + * used by the {@code com.auth0:java-jwt} library, which is the underlying + * library used by {@link AuthzeroTokenResolver} to handle JSON Web Tokens + * (JWTs). *

* Algorithm Mapping: - * The {@code AuthzeroTokenResolverConfig} allows specifying the relationship + * The {@code AuthzeroTokenResolverConfig} allows specifying the relationships * between the standard {@link TokenAlgorithm} instances supported by * {@link AuthzeroTokenResolver} and the corresponding algorithms used by the * {@code com.auth0:java-jwt} library. The mapping is achieved using a Map, - * where the keys are the standard TokenAlgorithm instances, and the values - * represent the algorithm functions used by Auth0 Java JWT library for each - * corresponding key. + * where the keys are the standard {@link TokenAlgorithm} instances, and the + * values represent the algorithm functions used by {@code com.auth0:java-jwt} + * library for each corresponding key. *

* Note: * The provided algorithm mapping should be consistent with the actual @@ -56,7 +57,7 @@ import java.util.function.Function; * validation and processing within the {@link AuthzeroTokenResolver}. * * @author Zihlu Wang - * @version 1.1.0 + * @version 1.1.1 * @since 1.0.0 */ public final class AuthzeroTokenResolverConfig implements TokenResolverConfig> { diff --git a/simple-jwt-facade/src/main/java/cn/org/codecrafters/simplejwt/config/TokenResolverConfig.java b/simple-jwt-facade/src/main/java/cn/org/codecrafters/simplejwt/config/TokenResolverConfig.java index 2989a03..f29e198 100644 --- a/simple-jwt-facade/src/main/java/cn/org/codecrafters/simplejwt/config/TokenResolverConfig.java +++ b/simple-jwt-facade/src/main/java/cn/org/codecrafters/simplejwt/config/TokenResolverConfig.java @@ -21,8 +21,8 @@ import cn.org.codecrafters.simplejwt.TokenResolver; import cn.org.codecrafters.simplejwt.constants.TokenAlgorithm; /** - * The {@code TokenResolverConfig} provides a mechanism to configure a - * {@link TokenResolver} with algorithm functions. + * The {@code TokenResolverConfig} provides a mechanism to configure an + * implementation of {@link TokenResolver} with algorithm functions. *

* This generic interface is used to define the configuration details for a * {@link TokenResolver} that utilizes algorithm functions. The interface diff --git a/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/JjwtTokenResolver.java b/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/JjwtTokenResolver.java index b8896ef..aa47584 100644 --- a/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/JjwtTokenResolver.java +++ b/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/JjwtTokenResolver.java @@ -49,11 +49,6 @@ import java.util.UUID; * This resolver provides functionality to create, extract, verify, and renew * JWT tokens using various algorithms and custom payload data. *

- * Dependencies: - * This implementation relies on the {@code io.jsonwebtoken:jjwt} library. Please - * ensure you have added this library as a dependency to your project before - * using this resolver. - *

* Usage: * To use the {@code JjwtTokenResolver}, first, create an instance of this * class: diff --git a/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/config/JjwtTokenResolverConfig.java b/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/config/JjwtTokenResolverConfig.java index a174665..89eefba 100644 --- a/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/config/JjwtTokenResolverConfig.java +++ b/simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/config/JjwtTokenResolverConfig.java @@ -28,19 +28,20 @@ import java.util.HashMap; import java.util.Map; /** - * The {@code JjwtTokenResolverConfig} class provides the configuration for the - * {@link JjwtTokenResolver}. + * The {@code JjwtTokenResolverConfig} class provides the configuration for + * the {@link JjwtTokenResolver}. *

- * This configuration class is used to establish the mapping between the - * standard {@link TokenAlgorithm} defined within the - * {@code JjwtTokenResolverConfig} and the specific algorithms used by the - * {@code io.jsonwebtoken:jjwt} library, which is the underlying library used - * by {@code JjwtTokenResolver} to handle JSON Web Tokens (JWTs). + * This configuration is used to establish the mapping between the standard + * {@link TokenAlgorithm} defined in the + * {@code cn.org.codecrafters:simple-jwt-facade} and the specific algorithms + * used by the {@code io.jsonwebtoken:jjwt} library, which is the underlying + * library used by {@link JjwtTokenResolver} to handle JSON Web Tokens + * (JWTs). *

* Algorithm Mapping: - * The {@code JjwtTokenResolverConfig} allows specifying the relationship - * between the standard {@link TokenAlgorithm} instances supported by {@link - * JjwtTokenResolver} and the corresponding algorithms used by the + * The {@code JjwtTokenResolverConfig} allows specifying the relationships + * between the standard {@link TokenAlgorithm} instances supported by + * {@link JjwtTokenResolver} and the corresponding algorithms used by the * {@code io.jsonwebtoken:jjwt} library. The mapping is achieved using a Map, * where the keys are the standard {@link TokenAlgorithm} instances, and the * values represent the algorithm functions used by @@ -53,7 +54,7 @@ import java.util.Map; * validation and processing within the {@link JjwtTokenResolver}. * * @author Zihlu Wang - * @version 1.1.0 + * @version 1.1.1 * @since 1.0.0 */ public final class JjwtTokenResolverConfig implements TokenResolverConfig {