Class TokenValidator


  • @Component
    public class TokenValidator
    extends Object
    Token validator
    Author:
    Raj Kumar Jha, Ramadurai Pandian, Urvil Joshi
    • Constructor Detail

      • TokenValidator

        public TokenValidator()
    • Method Detail

      • getAdminClaims

        public io.mosip.kernel.core.authmanager.model.MosipUserDto getAdminClaims​(String token)
      • isExpired

        public boolean isExpired​(String token)
        Returns true if token if expired else false
        Parameters:
        token - the token
        Returns:
        true if token if expired else false
      • getKeycloakRealm

        public String getKeycloakRealm​(String token)
      • validateToken

        public io.mosip.kernel.core.authmanager.model.MosipUserTokenDto validateToken​(String token)
                                                                               throws Exception
        Throws:
        Exception
      • validateOTP

        public io.mosip.kernel.core.authmanager.model.MosipUserTokenDto validateOTP​(String otp)
                                                                             throws Exception
        Throws:
        Exception