Class TokenValidator
- java.lang.Object
-
- io.mosip.kernel.auth.defaultimpl.util.TokenValidator
-
@Component public class TokenValidator extends Object
Token validator- Author:
- Raj Kumar Jha, Ramadurai Pandian, Urvil Joshi
-
-
Constructor Summary
Constructors Constructor Description TokenValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MosipUserTokenbasicValidate(String token)io.mosip.kernel.core.authmanager.model.MosipUserDtogetAdminClaims(String token)Stringgetissuer(String token)StringgetKeycloakRealm(String token)booleanisExpired(String token)Returns true if token if expired else falsebooleanvalidateExpiry(String token)MosipUserTokenvalidateForOtpVerification(String token)io.mosip.kernel.core.authmanager.model.MosipUserTokenDtovalidateOTP(String otp)io.mosip.kernel.core.authmanager.model.MosipUserTokenDtovalidateToken(String token)
-
-
-
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
-
validateForOtpVerification
public MosipUserToken validateForOtpVerification(String token) throws Exception
- Throws:
Exception
-
basicValidate
public MosipUserToken basicValidate(String token) throws Exception
- Throws:
Exception
-
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
-
-