diff --git a/service/src/main/java/org/broadinstitute/listener/relay/http/RelayedHttpRequestProcessor.java b/service/src/main/java/org/broadinstitute/listener/relay/http/RelayedHttpRequestProcessor.java index af5748a..e595bcd 100644 --- a/service/src/main/java/org/broadinstitute/listener/relay/http/RelayedHttpRequestProcessor.java +++ b/service/src/main/java/org/broadinstitute/listener/relay/http/RelayedHttpRequestProcessor.java @@ -166,13 +166,12 @@ public Result writeSetCookieResponse(RelayedHttpListenerContext context) { // Get token from request var unverifiedAuthToken = Utils.getTokenFromAuthorization(context.getRequest().getHeaders()); - // Verify the JWT signature - JWTVerifier.BaseVerification verifier = (JWTVerifier.BaseVerification); - DecodedJWT authToken = verifier.build().verify(unverifiedAuthToken); - - if (authToken.isEmpty()) { + if (unverifiedAuthToken.isEmpty()) { return Result.FAILURE; } + // Verify the JWT signature + JWTVerifier.BaseVerification verifier = (JWTVerifier.BaseVerification); + DecodedJWT authToken = verifier.build().verify(unverifiedAuthToken.toString()); Map requestHeaders = context.getRequest().getHeaders();