Class ValidateTokenUtil
- java.lang.Object
-
- io.mosip.kernel.authcodeflowproxy.api.validator.ValidateTokenUtil
-
@Component public class ValidateTokenUtil extends Object
Token validator- Author:
- Loganathan S
-
-
Constructor Summary
Constructors Constructor Description ValidateTokenUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PublicKeygetPublicKey(com.auth0.jwt.interfaces.DecodedJWT decodedJWT)org.apache.commons.lang3.tuple.ImmutablePair<Boolean,AuthErrorCode>isTokenValid(com.auth0.jwt.interfaces.DecodedJWT decodedJWT)org.apache.commons.lang3.tuple.ImmutablePair<Boolean,AuthErrorCode>isTokenValid(String jwtToken)voidvalidateToken(String accessToken)org.apache.commons.lang3.tuple.ImmutablePair<Boolean,AuthErrorCode>verifyJWTSignagure(com.auth0.jwt.interfaces.DecodedJWT decodedJWT)Verify the signature of the given JWT.
-
-
-
Method Detail
-
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.
-
-