Skip to content

Commit 792d5e8

Browse files
committed
Updated comments and removed commented code
1 parent c2955a7 commit 792d5e8

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

auth0-api-java/src/main/java/com/auth0/DisabledDPoPAuthentication.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public DisabledDPoPAuthentication(JWTValidator jwtValidator, TokenExtractor extr
2525
public AuthenticationContext authenticate(HttpRequestInfo requestInfo)
2626
throws BaseAuthException {
2727

28-
// Map<String, String> normalizedHeader = normalize(requestInfo.getHeaders());
2928
try {
3029
DecodedJWT jwt = validateBearerToken(requestInfo);
3130

auth0-api-java/src/main/java/com/auth0/RequiredDPoPAuthentication.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public RequiredDPoPAuthentication(JWTValidator jwtValidator,
1919
}
2020

2121
/**
22-
* Authenticates the request when DPoP Mode is Allowed (Accepts only DPoP tokens) .
22+
* Authenticates the request when DPoP Mode is Required (Accepts only DPoP tokens) .
2323
* @param requestInfo HTTP request info
2424
* @return AuthenticationContext with JWT claims
2525
* @throws BaseAuthException if validation fails
@@ -28,8 +28,6 @@ public RequiredDPoPAuthentication(JWTValidator jwtValidator,
2828
public AuthenticationContext authenticate(HttpRequestInfo requestInfo)
2929
throws BaseAuthException {
3030

31-
// Map<String, String> normalizedHeader = normalize(requestInfo.getHeaders());
32-
3331
try {
3432
DecodedJWT decodedJWT = validateDpopTokenAndProof(requestInfo);
3533
return buildContext(decodedJWT);

auth0-api-java/src/main/java/com/auth0/cache/InMemoryAuthCache.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
* Uses a {@link ReentrantReadWriteLock} so concurrent reads do not block each
2626
* other,
2727
* while writes acquire exclusive access.
28+
* Protected by a {@link ReentrantReadWriteLock}. Because the underlying
29+
* {@link LinkedHashMap} is configured in access-order for LRU eviction,
30+
* {@link #get(String)} mutates the map and therefore acquires the write lock.
31+
* As a result, cache operations ({@code get}, {@code put}, {@code remove},
32+
* {@code clear}) are serialized; only {@link #size()} uses the read lock for
33+
* concurrent inspection.
2834
* </p>
2935
*
3036
* @param <V> the type of cached values

auth0-api-java/src/main/java/com/auth0/models/HttpRequestInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class HttpRequestInfo {
1515
public HttpRequestInfo(String httpMethod, String httpUrl, Map<String, String> headers) throws InvalidRequestException {
1616
Asserts.notNull(headers, "Headers map cannot be null");
1717

18-
this.httpMethod = httpMethod.toUpperCase();
18+
this.httpMethod = httpMethod != null ? httpMethod.toUpperCase() : null;
1919
this.httpUrl = httpUrl;
2020
this.headers = normalize(headers);
2121
}

0 commit comments

Comments
 (0)