docs: Fix all docs from one <p> represents for a paragraph
This commit is contained in:
+5
-7
@@ -43,13 +43,13 @@ import java.util.*;
|
||||
* com.auth0:java-jwt} library to handle JSON Web Token (JWT) resolution. This
|
||||
* resolver provides functionality to create, extract, verify, and renew JWT
|
||||
* tokens using various algorithms and custom payload data.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Dependencies:</b>
|
||||
* 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.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Usage:</b>
|
||||
* To use the {@code AuthzeroTokenResolver}, first, create an instance of this
|
||||
@@ -61,7 +61,7 @@ import java.util.*;
|
||||
* "Token Issuer",
|
||||
* "Token Secret");
|
||||
* }</pre>
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Then, you can utilize the various methods provided by this resolver to
|
||||
* handle JWT tokens:
|
||||
@@ -82,14 +82,13 @@ import java.util.*;
|
||||
* String renewedToken =
|
||||
* tokenResolver.renew(token, Duration.ofMinutes(30), customPayloads);
|
||||
* }</pre>
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* <b>Note:</b>
|
||||
* It is essential to configure the appropriate algorithms, secret, and issuer
|
||||
* according to your specific use case when using this resolver.
|
||||
* Additionally, ensure that the {@code com.auth0:java-jwt} library is
|
||||
* correctly configured in your project's dependencies.
|
||||
* </p>
|
||||
*
|
||||
* @author Zihlu Wang
|
||||
* @version 1.0.0
|
||||
@@ -264,10 +263,9 @@ public class AuthzeroTokenResolver implements TokenResolver<DecodedJWT> {
|
||||
/**
|
||||
* <p>
|
||||
* Finish creating a token.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* This is the final step of create a token, to sign this token.
|
||||
* </p>
|
||||
*
|
||||
* @param builder the builder to build this JWT
|
||||
* @return the generated token as a {@code String}
|
||||
|
||||
+4
-7
@@ -64,12 +64,11 @@ public final class AuthzeroTokenResolverConfig implements TokenResolverConfig<Fu
|
||||
/**
|
||||
* <p>
|
||||
* Constructs a new instance of AuthzeroTokenResolverConfig.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The constructor is set as private to enforce the singleton pattern for
|
||||
* this configuration class. Instances of AuthzeroTokenResolverConfig
|
||||
* should be obtained through the {@link #getInstance()} method.
|
||||
* </p>
|
||||
*/
|
||||
private AuthzeroTokenResolverConfig() {
|
||||
}
|
||||
@@ -77,20 +76,19 @@ public final class AuthzeroTokenResolverConfig implements TokenResolverConfig<Fu
|
||||
/**
|
||||
* <p>
|
||||
* The singleton instance of AuthzeroTokenResolverConfig.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* This instance is used to ensure that only one instance of
|
||||
* AuthzeroTokenResolverConfig is created and shared throughout the
|
||||
* application. The singleton pattern is implemented to provide centralized
|
||||
* configuration and avoid redundant object creation.
|
||||
* </p>
|
||||
*/
|
||||
private static AuthzeroTokenResolverConfig instance;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* The supported algorithms and their corresponding algorithm functions.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* This map stores the supported algorithms as keys and their corresponding
|
||||
* algorithm functions as values. The algorithm functions represent the
|
||||
@@ -126,14 +124,13 @@ public final class AuthzeroTokenResolverConfig implements TokenResolverConfig<Fu
|
||||
* <p>
|
||||
* Gets the algorithm function corresponding to the specified
|
||||
* TokenAlgorithm.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* This method returns the algorithm function associated with the given
|
||||
* TokenAlgorithm. The provided TokenAlgorithm represents the specific
|
||||
* algorithm for which the corresponding algorithm function is required.
|
||||
* The returned AlgorithmFunction represents the function implementation
|
||||
* that can be used by the TokenResolver to handle the specific algorithm.
|
||||
* </p>
|
||||
*
|
||||
* @param algorithm the TokenAlgorithm for which the algorithm function is
|
||||
* required
|
||||
|
||||
-5
@@ -21,13 +21,11 @@
|
||||
* configuration classes related to the {@link
|
||||
* cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver}
|
||||
* implementation.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The classes in this package provide configuration options and settings for
|
||||
* the {@link cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver},
|
||||
* which is used for resolving JSON Web Tokens (JWT) using the Auth0 library.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The {@link
|
||||
@@ -39,7 +37,6 @@
|
||||
* JWT algorithms. It enables developers to specify and customize the
|
||||
* algorithm functions according to the chosen JWT algorithm and the library
|
||||
* being used.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The configuration options in this package help developers integrate and
|
||||
@@ -48,7 +45,6 @@
|
||||
* into their Spring Boot applications. Developers can fine-tune the token
|
||||
* resolution process and customize algorithm handling to align with their
|
||||
* specific requirements and desired level of security.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* It is recommended to explore the classes in this package to understand how
|
||||
@@ -56,7 +52,6 @@
|
||||
* cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver} effectively
|
||||
* in the Spring Boot environment to handle JWT authentication and
|
||||
* authorization securely and efficiently.
|
||||
* </p>
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
+2
-10
@@ -16,20 +16,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* <h3>cn.org.codecrafters.simplejwt.authzero</h3>
|
||||
*
|
||||
* <p>
|
||||
* This package contains classes related to the integration of the {@code
|
||||
* com.auth0:java-jwt} library in the Simple JWT project. {@code
|
||||
* com.auth0:java-jwt} library in the Simple JWT project. {@code
|
||||
* com.auth0:java-jwt} is a powerful and widely-used Identity as a Service
|
||||
* (IDaaS) platform that provides secure authentication and authorization
|
||||
* solutions for web and mobile applications. The classes in this package
|
||||
* provide the necessary functionality to handle JSON Web Tokens (JWTs) using
|
||||
* the {@code com.auth0:java-jwt} library.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The main class in this package is the {@link
|
||||
* The main class in this package is the {@link
|
||||
* cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver}, which
|
||||
* implements the {@link cn.org.codecrafters.simplejwt.TokenResolver} interface
|
||||
* and uses the {@code com.auth0:java-jwt} library to handle JWT operations. It
|
||||
@@ -37,7 +33,6 @@
|
||||
* {@code com.auth0:java-jwt} library. Developers can use this class as the
|
||||
* main token resolver in the Simple JWT project when integrating {@code
|
||||
* com.auth0:java-jwt} as the JWT management library.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* The {@code AuthzeroTokenResolver} relies on the {@code com.auth0:java-jwt}
|
||||
@@ -45,7 +40,6 @@
|
||||
* validation, and extraction. It utilizes the {@code com.auth0:java-jwt}
|
||||
* {@code Algorithm} class to define and use different algorithms for JWT
|
||||
* signing and verification.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* To use the {@code AuthzeroTokenResolver}, developers must provide the
|
||||
@@ -54,14 +48,12 @@
|
||||
* issuer name, and the secret key used for token signing and validation. The
|
||||
* {@code AuthzeroTokenResolverConfig} class provides a convenient way to
|
||||
* configure these dependencies.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Developers using the {@code com.auth0:java-jwt} integration should be
|
||||
* familiar with the concepts and usage of the {@code com.auth0:java-jwt}
|
||||
* library and follow the official {@code com.auth0:java-jwt} documentation for
|
||||
* best practices and security considerations.
|
||||
* </p>
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user