Skip to content

Commit 0ce8219

Browse files
committed
Merge branch 'feat/mcd-initials' into feat/mcd-feature
2 parents 3443a60 + 792d5e8 commit 0ce8219

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
@@ -22,7 +22,6 @@ public DisabledDPoPAuthentication(JWTValidator jwtValidator, TokenExtractor extr
2222
public AuthenticationContext authenticate(HttpRequestInfo requestInfo)
2323
throws BaseAuthException {
2424

25-
// Map<String, String> normalizedHeader = normalize(requestInfo.getHeaders());
2625
try {
2726
DecodedJWT jwt = validateBearerToken(requestInfo);
2827

auth0-api-java/src/main/java/com/auth0/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/RequiredDPoPAuthentication.java

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

1717
/**
18-
* Authenticates the request when DPoP Mode is Allowed (Accepts only DPoP tokens) .
18+
* Authenticates the request when DPoP Mode is Required (Accepts only DPoP tokens) .
1919
* @param requestInfo HTTP request info
2020
* @return AuthenticationContext with JWT claims
2121
* @throws BaseAuthException if validation fails
@@ -24,8 +24,6 @@ public RequiredDPoPAuthentication(JWTValidator jwtValidator,
2424
public AuthenticationContext authenticate(HttpRequestInfo requestInfo)
2525
throws BaseAuthException {
2626

27-
// Map<String, String> normalizedHeader = normalize(requestInfo.getHeaders());
28-
2927
try {
3028
DecodedJWT decodedJWT = validateDpopTokenAndProof(requestInfo);
3129
return buildContext(decodedJWT);

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)