Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
mathew-jose committed Aug 26, 2024
1 parent 2579c0d commit e5deec1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import com.nimbusds.jose.jwk.JWKSet;
import com.nimbusds.jose.jwk.RSAKey;
import com.nimbusds.jwt.JWTParser;
import com.nimbusds.jwt.SignedJWT;
import com.nimbusds.jwt.PlainJWT;
import com.nimbusds.jwt.SignedJWT;
import io.jsonwebtoken.*;
import java.io.ByteArrayInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -143,8 +143,7 @@ private String getJwtSecret(JWSHeader header) throws JOSEException {
*/
public boolean validateJwtToken(String authToken) {
try {
if (JWTParser.parse(authToken) instanceof PlainJWT)
return true;
if (JWTParser.parse(authToken) instanceof PlainJWT) return true;
SignedJWT signedJWT = SignedJWT.parse(authToken);
JWSHeader header = signedJWT.getHeader();
Algorithm alg = header.getAlgorithm();
Expand Down

0 comments on commit e5deec1

Please sign in to comment.