File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/eu/webeid/security/validator Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3535
3636import java .io .IOException ;
3737import java .security .cert .X509Certificate ;
38+ import java .util .Objects ;
3839
3940/**
4041 * Provides the default implementation of {@link AuthTokenValidator}.
@@ -46,10 +47,10 @@ final class AuthTokenValidatorManager implements AuthTokenValidator {
4647 private final AuthTokenVersionValidatorFactory tokenValidatorFactory ;
4748
4849 // Use human-readable meaningful names for token length limits.
49- private final int TOKEN_MIN_LENGTH = 100 ;
50- private final int TOKEN_MAX_LENGTH = 10000 ;
50+ private static final int TOKEN_MIN_LENGTH = 100 ;
51+ private static final int TOKEN_MAX_LENGTH = 10000 ;
5152
52- private final ObjectReader TOKEN_READER = new ObjectMapper ().readerFor (WebEidAuthToken .class );
53+ private static final ObjectReader TOKEN_READER = new ObjectMapper ().readerFor (WebEidAuthToken .class );
5354
5455 AuthTokenValidatorManager (AuthTokenValidationConfiguration configuration , OcspClient ocspClient )
5556 throws JceException {
@@ -72,6 +73,7 @@ public WebEidAuthToken parse(String authToken) throws AuthTokenException {
7273 @ Override
7374 public X509Certificate validate (WebEidAuthToken authToken , String currentChallengeNonce ) throws AuthTokenException {
7475 try {
76+ Objects .requireNonNull (authToken , "authToken must not be null" );
7577 LOG .info ("Starting token validation" );
7678 return tokenValidatorFactory
7779 .getValidatorFor (authToken .getFormat ())
You can’t perform that action at this time.
0 commit comments