Skip to content

Commit a3949c1

Browse files
committed
Feat: Added Transitive dependency
1 parent 66250f0 commit a3949c1

32 files changed

Lines changed: 232 additions & 242 deletions

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import com.auth0.models.AuthToken;
88
import com.auth0.models.AuthenticationContext;
99
import com.auth0.models.HttpRequestInfo;
10-
import com.auth0.validators.DPoPProofValidator;
11-
import com.auth0.validators.JWTValidator;
1210

1311
import java.util.HashMap;
1412
import java.util.List;

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
import com.auth0.jwt.interfaces.DecodedJWT;
77
import com.auth0.models.AuthenticationContext;
88
import com.auth0.models.HttpRequestInfo;
9-
import com.auth0.validators.DPoPProofValidator;
10-
import com.auth0.validators.JWTValidator;
119

12-
import java.util.Map;
1310
class AllowedDPoPAuthentication extends AbstractAuthentication {
1411

1512
public AllowedDPoPAuthentication(JWTValidator jwtValidator,

auth0-api-java/src/main/java/com/auth0/cache/AuthCache.java renamed to auth0-api-java/src/main/java/com/auth0/AuthCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.auth0.cache;
1+
package com.auth0;
22

33
/**
44
* Cache abstraction for storing authentication-related data such as

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
import com.auth0.models.AuthenticationContext;
55
import com.auth0.models.AuthOptions;
66
import com.auth0.models.HttpRequestInfo;
7-
import com.auth0.validators.DPoPProofValidator;
8-
import com.auth0.validators.JWTValidator;
9-
10-
import java.util.Map;
117

128
public class AuthClient {
139

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.auth0;
22

3-
public class AuthConstants {
3+
class AuthConstants {
44
public static final String AUTHORIZATION_HEADER = "authorization";
55
public static final String DPOP_HEADER = "dpop";
66
public static final String BEARER_SCHEME = "bearer";

auth0-api-java/src/main/java/com/auth0/validators/ClaimValidator.java renamed to auth0-api-java/src/main/java/com/auth0/ClaimValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.auth0.validators;
1+
package com.auth0;
22

33
import com.auth0.exception.*;
44
import com.auth0.jwt.interfaces.DecodedJWT;

auth0-api-java/src/main/java/com/auth0/validators/DPoPProofValidator.java renamed to auth0-api-java/src/main/java/com/auth0/DPoPProofValidator.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.auth0.validators;
1+
package com.auth0;
22

33
import com.auth0.exception.BaseAuthException;
44
import com.auth0.exception.InvalidDpopProofException;
@@ -20,13 +20,13 @@
2020
import java.time.Instant;
2121
import java.util.*;
2222

23-
public class DPoPProofValidator {
23+
class DPoPProofValidator {
2424

2525
private final AuthOptions options;
2626
private final ObjectMapper objectMapper = new ObjectMapper();;
2727

2828

29-
public DPoPProofValidator(AuthOptions options) {
29+
DPoPProofValidator(AuthOptions options) {
3030
this.options = options;
3131
}
3232

@@ -38,7 +38,7 @@ public DPoPProofValidator(AuthOptions options) {
3838
* @param requestInfo HTTP request info: method and URL
3939
* @throws BaseAuthException if the DPoP proof is invalid.
4040
*/
41-
public void validate(String dpopProof, DecodedJWT decodedJwtToken, HttpRequestInfo requestInfo)
41+
void validate(String dpopProof, DecodedJWT decodedJwtToken, HttpRequestInfo requestInfo)
4242
throws BaseAuthException {
4343

4444
DecodedJWT proofJwt = decodeDPoP(dpopProof);
@@ -197,7 +197,7 @@ String calculateJwkThumbprint(Map<String, Object> jwk) throws BaseAuthException
197197
}
198198
}
199199

200-
public static ECPublicKey convertJwkToEcPublicKey(Map<String, Object> jwkMap)
200+
static ECPublicKey convertJwkToEcPublicKey(Map<String, Object> jwkMap)
201201
throws JwkException {
202202

203203
Jwk jwk = Jwk.fromValues(jwkMap);

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
import com.auth0.jwt.interfaces.DecodedJWT;
66
import com.auth0.models.AuthenticationContext;
77
import com.auth0.models.HttpRequestInfo;
8-
import com.auth0.validators.JWTValidator;
9-
10-
import java.util.Map;
118

129
class DisabledDPoPAuthentication extends AbstractAuthentication {
1310

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.auth0.cache;
1+
package com.auth0;
22

33
import java.util.LinkedHashMap;
44
import java.util.Map;

auth0-api-java/src/main/java/com/auth0/validators/JWTValidator.java renamed to auth0-api-java/src/main/java/com/auth0/JWTValidator.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
package com.auth0.validators;
1+
package com.auth0;
22

3-
import com.auth0.cache.AuthCache;
4-
import com.auth0.cache.InMemoryAuthCache;
53
import com.auth0.exception.BaseAuthException;
64
import com.auth0.exception.MissingRequiredArgumentException;
75
import com.auth0.exception.VerifyAccessTokenException;
@@ -17,6 +15,7 @@
1715
import com.auth0.jwt.interfaces.DecodedJWT;
1816
import com.auth0.models.HttpRequestInfo;
1917
import com.auth0.models.RequestContext;
18+
import com.auth0.OidcDiscoveryFetcher;
2019

2120
import java.net.MalformedURLException;
2221
import java.net.URL;
@@ -32,7 +31,7 @@
3231
* algorithm
3332
* and JWKS (JSON Web Key Set) for public key retrieval.
3433
*/
35-
public class JWTValidator {
34+
class JWTValidator {
3635

3736
static final String JWKS_CACHE_PREFIX = "jwks:";
3837

@@ -47,7 +46,7 @@ public class JWTValidator {
4746
*
4847
* @param authOptions Authentication options containing domain and audience
4948
*/
50-
public JWTValidator(AuthOptions authOptions) {
49+
JWTValidator(AuthOptions authOptions) {
5150
if (authOptions == null) {
5251
throw new IllegalArgumentException("AuthOptions cannot be null");
5352
}
@@ -66,7 +65,7 @@ public JWTValidator(AuthOptions authOptions) {
6665
* @param authOptions Authentication options containing domain and audience
6766
* @param jwkProvider Custom JwkProvider for key retrieval
6867
*/
69-
public JWTValidator(AuthOptions authOptions, JwkProvider jwkProvider) {
68+
JWTValidator(AuthOptions authOptions, JwkProvider jwkProvider) {
7069
if (authOptions == null) {
7170
throw new IllegalArgumentException("AuthOptions cannot be null");
7271
}
@@ -117,7 +116,7 @@ private static AuthCache<Object> resolveCache(AuthOptions options) {
117116
* @return the decoded and verified JWT
118117
* @throws BaseAuthException if validation fails
119118
*/
120-
public DecodedJWT validateToken(String token, HttpRequestInfo httpRequestInfo) throws BaseAuthException {
119+
public DecodedJWT validateToken(String token, HttpRequestInfo httpRequestInfo) throws BaseAuthException {
121120

122121
if (token == null || token.trim().isEmpty()) {
123122
throw new MissingRequiredArgumentException("access_token");
@@ -167,7 +166,7 @@ public DecodedJWT validateToken(String token, HttpRequestInfo httpRequestInfo) t
167166
/**
168167
* Validates a JWT and ensures all required scopes are present.
169168
*/
170-
public DecodedJWT validateTokenWithRequiredScopes(String token, HttpRequestInfo httpRequestInfo, String... requiredScopes) throws BaseAuthException {
169+
DecodedJWT validateTokenWithRequiredScopes(String token, HttpRequestInfo httpRequestInfo, String... requiredScopes) throws BaseAuthException {
171170
DecodedJWT jwt = validateToken(token, httpRequestInfo);
172171
try {
173172
ClaimValidator.checkRequiredScopes(jwt, requiredScopes);

0 commit comments

Comments
 (0)