1- package com .auth0 . validators ;
1+ package com .auth0 ;
22
3- import com .auth0 .cache .AuthCache ;
4- import com .auth0 .cache .InMemoryAuthCache ;
53import com .auth0 .exception .BaseAuthException ;
64import com .auth0 .exception .MissingRequiredArgumentException ;
75import com .auth0 .exception .VerifyAccessTokenException ;
1715import com .auth0 .jwt .interfaces .DecodedJWT ;
1816import com .auth0 .models .HttpRequestInfo ;
1917import com .auth0 .models .RequestContext ;
18+ import com .auth0 .OidcDiscoveryFetcher ;
2019
2120import java .net .MalformedURLException ;
2221import java .net .URL ;
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