Skip to content

Commit a670d97

Browse files
author
Zihlu Wang
committed
doc(simple-jwt): Optimised Javadocs.
1 parent eb3b3b1 commit a670d97

File tree

5 files changed

+26
-34
lines changed

5 files changed

+26
-34
lines changed

simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/AuthzeroTokenResolver.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
* resolver provides functionality to create, extract, verify, and renew JWT
4646
* tokens using various algorithms and custom payload data.
4747
* <p>
48-
* <b>Dependencies:</b>
49-
* This implementation relies on the {@code com.auth0:java-jwt} library. Please
50-
* ensure you have added this library as a dependency to your project before
51-
* using this resolver.
52-
* <p>
5348
* <b>Usage:</b>
5449
* To use the {@code AuthzeroTokenResolver}, first, create an instance of this
5550
* class:
@@ -87,7 +82,7 @@
8782
* correctly configured in your project's dependencies.
8883
*
8984
* @author Zihlu Wang
90-
* @version 1.1.0
85+
* @version 1.1.1
9186
* @see GuidCreator
9287
* @see Algorithm
9388
* @see JWTVerifier
@@ -279,7 +274,7 @@ private void addClaim(JWTCreator.Builder builder, String name, Object value) {
279274
builder.withClaim(name, v);
280275
} else {
281276
log.warn("""
282-
Unable to determine the type of field {}, converting it to a string now.""", name);
277+
Unable to determine the type of field {}, we will handle it as a String.""", name);
283278
builder.withClaim(name, value.toString());
284279
}
285280
} else {

simple-jwt-authzero/src/main/java/cn/org/codecrafters/simplejwt/authzero/config/AuthzeroTokenResolverConfig.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,20 @@
3535
* the {@link AuthzeroTokenResolver}.
3636
* <p>
3737
* This configuration is used to establish the mapping between the standard
38-
* {@link TokenAlgorithm} defined within the {@link AuthzeroTokenResolver}
39-
* facade and the specific algorithms used by the {@code com.auth0:java-jwt}
40-
* library, which is the underlying library used by {@link
41-
* AuthzeroTokenResolver} to handle JSON Web Tokens (JWTs).
38+
* {@link TokenAlgorithm} defined in the
39+
* {@code cn.org.codecrafters:simple-jwt-facade} and the specific algorithms
40+
* used by the {@code com.auth0:java-jwt} library, which is the underlying
41+
* library used by {@link AuthzeroTokenResolver} to handle JSON Web Tokens
42+
* (JWTs).
4243
* <p>
4344
* <b>Algorithm Mapping:</b>
44-
* The {@code AuthzeroTokenResolverConfig} allows specifying the relationship
45+
* The {@code AuthzeroTokenResolverConfig} allows specifying the relationships
4546
* between the standard {@link TokenAlgorithm} instances supported by
4647
* {@link AuthzeroTokenResolver} and the corresponding algorithms used by the
4748
* {@code com.auth0:java-jwt} library. The mapping is achieved using a Map,
48-
* where the keys are the standard TokenAlgorithm instances, and the values
49-
* represent the algorithm functions used by Auth0 Java JWT library for each
50-
* corresponding key.
49+
* where the keys are the standard {@link TokenAlgorithm} instances, and the
50+
* values represent the algorithm functions used by {@code com.auth0:java-jwt}
51+
* library for each corresponding key.
5152
* <p>
5253
* <b>Note:</b>
5354
* The provided algorithm mapping should be consistent with the actual
@@ -56,7 +57,7 @@
5657
* validation and processing within the {@link AuthzeroTokenResolver}.
5758
*
5859
* @author Zihlu Wang
59-
* @version 1.1.0
60+
* @version 1.1.1
6061
* @since 1.0.0
6162
*/
6263
public final class AuthzeroTokenResolverConfig implements TokenResolverConfig<Function<String, Algorithm>> {

simple-jwt-facade/src/main/java/cn/org/codecrafters/simplejwt/config/TokenResolverConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import cn.org.codecrafters.simplejwt.constants.TokenAlgorithm;
2222

2323
/**
24-
* The {@code TokenResolverConfig} provides a mechanism to configure a
25-
* {@link TokenResolver} with algorithm functions.
24+
* The {@code TokenResolverConfig} provides a mechanism to configure an
25+
* implementation of {@link TokenResolver} with algorithm functions.
2626
* <p>
2727
* This generic interface is used to define the configuration details for a
2828
* {@link TokenResolver} that utilizes algorithm functions. The interface

simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/JjwtTokenResolver.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@
4949
* This resolver provides functionality to create, extract, verify, and renew
5050
* JWT tokens using various algorithms and custom payload data.
5151
* <p>
52-
* <b>Dependencies:</b>
53-
* This implementation relies on the {@code io.jsonwebtoken:jjwt} library. Please
54-
* ensure you have added this library as a dependency to your project before
55-
* using this resolver.
56-
* <p>
5752
* <b>Usage:</b>
5853
* To use the {@code JjwtTokenResolver}, first, create an instance of this
5954
* class:

simple-jwt-jjwt/src/main/java/cn/org/codecrafters/simplejwt/jjwt/config/JjwtTokenResolverConfig.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@
2828
import java.util.Map;
2929

3030
/**
31-
* The {@code JjwtTokenResolverConfig} class provides the configuration for the
32-
* {@link JjwtTokenResolver}.
31+
* The {@code JjwtTokenResolverConfig} class provides the configuration for
32+
* the {@link JjwtTokenResolver}.
3333
* <p>
34-
* This configuration class is used to establish the mapping between the
35-
* standard {@link TokenAlgorithm} defined within the
36-
* {@code JjwtTokenResolverConfig} and the specific algorithms used by the
37-
* {@code io.jsonwebtoken:jjwt} library, which is the underlying library used
38-
* by {@code JjwtTokenResolver} to handle JSON Web Tokens (JWTs).
34+
* This configuration is used to establish the mapping between the standard
35+
* {@link TokenAlgorithm} defined in the
36+
* {@code cn.org.codecrafters:simple-jwt-facade} and the specific algorithms
37+
* used by the {@code io.jsonwebtoken:jjwt} library, which is the underlying
38+
* library used by {@link JjwtTokenResolver} to handle JSON Web Tokens
39+
* (JWTs).
3940
* <p>
4041
* <b>Algorithm Mapping:</b>
41-
* The {@code JjwtTokenResolverConfig} allows specifying the relationship
42-
* between the standard {@link TokenAlgorithm} instances supported by {@link
43-
* JjwtTokenResolver} and the corresponding algorithms used by the
42+
* The {@code JjwtTokenResolverConfig} allows specifying the relationships
43+
* between the standard {@link TokenAlgorithm} instances supported by
44+
* {@link JjwtTokenResolver} and the corresponding algorithms used by the
4445
* {@code io.jsonwebtoken:jjwt} library. The mapping is achieved using a Map,
4546
* where the keys are the standard {@link TokenAlgorithm} instances, and the
4647
* values represent the algorithm functions used by
@@ -53,7 +54,7 @@
5354
* validation and processing within the {@link JjwtTokenResolver}.
5455
*
5556
* @author Zihlu Wang
56-
* @version 1.1.0
57+
* @version 1.1.1
5758
* @since 1.0.0
5859
*/
5960
public final class JjwtTokenResolverConfig implements TokenResolverConfig<SignatureAlgorithm> {

0 commit comments

Comments
 (0)