Class ValidateTokenUtil

java.lang.Object
io.mosip.kernel.authcodeflowproxy.api.validator.ValidateTokenUtil

@Component public class ValidateTokenUtil extends Object
Token validator
Author:
Loganathan S
  • Constructor Details

    • ValidateTokenUtil

      public ValidateTokenUtil()
  • Method Details

    • validateToken

      public void validateToken(String accessToken)
    • isTokenValid

      public org.apache.commons.lang3.tuple.ImmutablePair<Boolean,AuthErrorCode> isTokenValid(String jwtToken)
    • isTokenValid

      public org.apache.commons.lang3.tuple.ImmutablePair<Boolean,AuthErrorCode> isTokenValid(com.auth0.jwt.interfaces.DecodedJWT decodedJWT)
    • getPublicKey

      public PublicKey getPublicKey(com.auth0.jwt.interfaces.DecodedJWT decodedJWT)
    • verifyJWTSignagure

      public org.apache.commons.lang3.tuple.ImmutablePair<Boolean,AuthErrorCode> verifyJWTSignagure(com.auth0.jwt.interfaces.DecodedJWT decodedJWT)
      Verify the signature of the given JWT.
      Parameters:
      decodedJWT - - the decoded JWT
      Returns:
      if it is valid or not and any error code in case if it not valid.