Class ValidateTokenUtil


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

      • ValidateTokenUtil

        public ValidateTokenUtil()
    • Method Detail

      • validateToken

        public void validateToken​(String accessToken)
      • 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.