Skip to content

Commit 383934e

Browse files
aarmamSanderKondratjevNortal
authored andcommitted
NFC-46 Check null authToken
Signed-off-by: Sander Kondratjev [email protected]
1 parent 7e3f899 commit 383934e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/eu/webeid/security/validator/AuthTokenValidatorManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
import java.io.IOException;
3737
import java.security.cert.X509Certificate;
38+
import java.util.Objects;
3839

3940
/**
4041
* Provides the default implementation of {@link AuthTokenValidator}.
@@ -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())

0 commit comments

Comments
 (0)