fix: fixed ci error

This commit is contained in:
zihluwang
2024-08-06 22:14:23 +08:00
parent dad99dcea7
commit 2b10eed1d9
2 changed files with 19 additions and 40 deletions
@@ -16,43 +16,29 @@
*/ */
/** /**
* This package contains classes related to the integration of the {@code * This package contains classes related to the integration of the {@code com.auth0:java-jwt}
* com.auth0:java-jwt} library in the Simple JWT project. {@code * library in the Simple JWT project. {@code com.auth0:java-jwt} is a powerful and widely-used
* com.auth0:java-jwt} is a powerful and widely-used Identity as a Service * identity as a Service (IDaaS) platform that provides secure authentication and authorisation
* (IDaaS) platform that provides secure authentication and authorisation * solutions for web and mobile applications. The classes in this package provide the necessary
* solutions for web and mobile applications. The classes in this package * functionality to handle JSON Web Tokens (JWTs) using the {@code com.auth0:java-jwt} library.
* 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
* com.onixbyte.simplejwt.authzero.AuthzeroTokenResolver}, which * com.onixbyte.simplejwt.authzero.AuthzeroTokenResolver}, which implements the
* implements the {@link com.onixbyte.simplejwt.TokenResolver} interface * {@link com.onixbyte.simplejwt.TokenResolver} interface and uses the {@code com.auth0:java-jwt}
* and uses the {@code com.auth0:java-jwt} library to handle JWT operations. It * library to handle JWT operations. It provides the functionality to create, validate, and extract
* provides the functionality to create, validate, and extract JWTs using the * JWTs using the {@code com.auth0:java-jwt} library. Developers can use this class as the main
* {@code com.auth0:java-jwt} library. Developers can use this class as the * token resolver in the Simple JWT project when integrating {@code com.auth0:java-jwt} as the
* main token resolver in the Simple JWT project when integrating {@code * JWT management library.
* com.auth0:java-jwt} as the JWT management library.
* <p> * <p>
* The {@link com.onixbyte.simplejwt.authzero.AuthzeroTokenResolver} * The {@link com.onixbyte.simplejwt.authzero.AuthzeroTokenResolver} relies on the
* relies on the {@code com.auth0:java-jwt} library to handle the underlying * {@code com.auth0:java-jwt} library to handle the underlying JWT operations, including token
* JWT operations, including token creation, validation, and extraction. It * creation, validation, and extraction. It utilizes the {@code com.auth0:java-jwt}
* utilizes the {@code com.auth0:java-jwt} {@link * {@link com.auth0.jwt.algorithms.Algorithm} class to define and use different algorithms for
* com.auth0.jwt.algorithms.Algorithm} class to define and use different * JWT signing and verification.
* algorithms for JWT signing and verification.
* <p> * <p>
* To use the {@link * Developers using the {@code com.auth0:java-jwt} integration should be familiar with the concepts
* com.onixbyte.simplejwt.authzero.AuthzeroTokenResolver}, developers * and usage of the {@code com.auth0:java-jwt} library and follow the official
* must provide the necessary configurations and dependencies, such as the * {@code com.auth0:java-jwt} documentation for best practices and security considerations.
* {@link com.onixbyte.guid.GuidCreator} for generating unique JWT IDs
* (JTI), the supported algorithm function, the issuer name, and the secret key
* used for token signing and validation. The {@link
* com.onixbyte.simplejwt.authzero.config.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}
* library and follow the official {@code com.auth0:java-jwt} documentation for
* best practices and security considerations.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
@@ -30,11 +30,4 @@ import java.time.Duration;
*/ */
public class TestAuthzeroTokenResolver { public class TestAuthzeroTokenResolver {
@Test
public void test01() {
var tokenResolver = new AuthzeroTokenResolver(TokenAlgorithm.HS384, "Test Issuer", "Test Secret");
var testToken = tokenResolver.createToken(Duration.ofMinutes(30), "Test Audience", "User00001");
System.out.println(testToken);
}
} }