docs(global): Optimised javadocs.

This commit is contained in:
Zihlu Wang
2023-09-15 15:36:25 +08:00
parent baa91f626a
commit 6549373e8d
46 changed files with 177 additions and 214 deletions
@@ -39,19 +39,16 @@ import java.time.ZoneId;
import java.util.*;
/**
* <p>
* The {@code AuthzeroTokenResolver} class is an implementation of the {@link
* cn.org.codecrafters.simplejwt.TokenResolver} interface. It uses the {@code
* 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>
* <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>
* <b>Usage:</b>
* To use the {@code AuthzeroTokenResolver}, first, create an instance of this
@@ -63,11 +60,9 @@ import java.util.*;
* "Token Issuer",
* "Token Secret");
* }</pre>
*
* <p>
* Then, you can utilize the various methods provided by this resolver to
* handle JWT tokens:
*
* <pre>{@code
* // Creating a new JWT token
* String token =
@@ -84,7 +79,6 @@ import java.util.*;
* String renewedToken =
* tokenResolver.renew(token, Duration.ofMinutes(30), customPayloads);
* }</pre>
*
* <p>
* <b>Note:</b>
* It is essential to configure the appropriate algorithms, secret, and issuer
@@ -93,7 +87,7 @@ import java.util.*;
* correctly configured in your project's dependencies.
*
* @author Zihlu Wang
* @version 1.0.0
* @version 1.1.0
* @see GuidCreator
* @see Algorithm
* @see JWTVerifier
@@ -37,7 +37,6 @@ import java.util.function.Function;
* the specific algorithms used by the Auth0 Java JWT library, which is the
* underlying library used by AuthzeroTokenResolver to handle JSON Web Tokens
* (JWTs).
*
* <p>
* <b>Algorithm Mapping:</b>
* The AuthzeroTokenResolverConfig class allows specifying the relationship
@@ -47,7 +46,6 @@ import java.util.function.Function;
* keys are the standard TokenAlgorithm instances, and the values represent the
* algorithm functions used by Auth0 Java JWT library for each corresponding
* key.
*
* <p>
* <b>Note:</b>
* The provided algorithm mapping should be consistent with the actual
@@ -56,7 +54,7 @@ import java.util.function.Function;
* and processing within the AuthzeroTokenResolver.
*
* @author Zihlu Wang
* @version 1.0.0
* @version 1.1.0
* @since 1.0.0
*/
public final class AuthzeroTokenResolverConfig implements TokenResolverConfig<Function<String, Algorithm>> {
@@ -16,17 +16,14 @@
*/
/**
* <p>
* The package {@code cn.org.codecrafters.simplejwt.authzero.config} contains
* configuration classes related to the {@link
* cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver}
* implementation.
*
* <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>
* The {@link
* cn.org.codecrafters.simplejwt.authzero.config.AuthzeroTokenResolverConfig}
@@ -37,7 +34,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>
* The configuration options in this package help developers integrate and
* configure the {@link
@@ -45,7 +41,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>
* It is recommended to explore the classes in this package to understand how
* to configure and use the {@link
@@ -23,7 +23,6 @@
* 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>
* The main class in this package is the {@link
* cn.org.codecrafters.simplejwt.authzero.AuthzeroTokenResolver}, which
@@ -33,14 +32,12 @@
* {@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>
* The {@code AuthzeroTokenResolver} relies on the {@code com.auth0:java-jwt}
* library to handle the underlying JWT operations, including token creation,
* 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>
* To use the {@code AuthzeroTokenResolver}, developers must provide the
* necessary configurations and dependencies, such as the {@code GuidCreator}
@@ -48,7 +45,6 @@
* 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>
* Developers using the {@code com.auth0:java-jwt} integration should be
* familiar with the concepts and usage of the {@code com.auth0:java-jwt}