Class BaseAuthRequestValidator
- java.lang.Object
-
- io.mosip.authentication.common.service.validator.IdAuthValidator
-
- io.mosip.authentication.common.service.validator.BaseAuthRequestValidator
-
- All Implemented Interfaces:
org.springframework.validation.Validator
- Direct Known Subclasses:
AuthRequestValidator
@Component public abstract class BaseAuthRequestValidator extends IdAuthValidator
The Class BaseAuthRequestValidator.- Author:
- Manoj SP, Prem Kumar, RakeshRoshan
-
-
Field Summary
Fields Modifier and Type Field Description protected IdInfoFetcheridInfoFetcherThe id info helper.protected IdInfoHelperidInfoHelperThe id info helper.-
Fields inherited from class io.mosip.authentication.common.service.validator.IdAuthValidator
MISSING_INPUT_PARAMETER, VALIDATE
-
-
Constructor Summary
Constructors Constructor Description BaseAuthRequestValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckDemoAuth(AuthRequestDTO authRequest, org.springframework.validation.Errors errors)Check demo auth.protected abstract intgetMaxFingerCount()Gets the max finger count.protected intgetMaxIrisCount()Gets the max iris count.booleansupports(Class<?> clazz)Supports.voidvalidate(Object req, org.springframework.validation.Errors errors)Validate.protected voidvalidateAdditionalFactorsDetails(AuthRequestDTO authRequestDTO, org.springframework.validation.Errors errors)validates the Static Pin Details.protected voidvalidateAllowedAuthTypes(AuthRequestDTO requestDTO, org.springframework.validation.Errors errors)Method to validate auth type.protected voidvalidateAuthType(AuthRequestDTO authRequestDto, org.springframework.validation.Errors errors)Validates the AuthType.protected voidvalidateBioMetadataDetails(AuthRequestDTO authRequestDTO, org.springframework.validation.Errors errors, Set<String> allowedAuthType)Validate Biometric details i.e validating fingers,iris,face and device information.protected voidvalidateLangCode(String langCode, org.springframework.validation.Errors errors, String field)validates langauges request.-
Methods inherited from class io.mosip.authentication.common.service.validator.IdAuthValidator
getAllowedAuthTypeProperty, getAllowedAuthTypes, getAllowedIdTypes, getAllowedIdTypesConfigVal, requestTimeParser, validateConsentReq, validateId, validateIdvId, validateIdvId, validateReqTime, validateReqTime, validateRequestTimedOut, validateRequestTimedOut, validateTxnId, validateTxnId
-
-
-
-
Field Detail
-
idInfoHelper
@Autowired protected IdInfoHelper idInfoHelper
The id info helper.
-
idInfoFetcher
@Autowired protected IdInfoFetcher idInfoFetcher
The id info helper.
-
-
Method Detail
-
supports
public boolean supports(Class<?> clazz)
Supports.- Parameters:
clazz- the clazz- Returns:
- true, if successful
-
validate
public void validate(Object req, org.springframework.validation.Errors errors)
Validate.- Parameters:
req- the reqerrors- the errors
-
validateAdditionalFactorsDetails
protected void validateAdditionalFactorsDetails(AuthRequestDTO authRequestDTO, org.springframework.validation.Errors errors)
validates the Static Pin Details.- Parameters:
authRequestDTO- the auth request DTOerrors- the errors
-
validateBioMetadataDetails
protected void validateBioMetadataDetails(AuthRequestDTO authRequestDTO, org.springframework.validation.Errors errors, Set<String> allowedAuthType)
Validate Biometric details i.e validating fingers,iris,face and device information.- Parameters:
authRequestDTO- the auth request DTOerrors- the errorsallowedAuthType- the allowed auth type
-
getMaxFingerCount
protected abstract int getMaxFingerCount()
Gets the max finger count.- Returns:
- the max finger count
-
checkDemoAuth
protected void checkDemoAuth(AuthRequestDTO authRequest, org.springframework.validation.Errors errors)
Check demo auth.- Parameters:
authRequest- the auth requesterrors- the errors
-
validateAuthType
protected void validateAuthType(AuthRequestDTO authRequestDto, org.springframework.validation.Errors errors)
Validates the AuthType.- Parameters:
authType- the auth typeerrors- the errors
-
validateAllowedAuthTypes
protected void validateAllowedAuthTypes(AuthRequestDTO requestDTO, org.springframework.validation.Errors errors)
Method to validate auth type.- Parameters:
requestDTO- the request DTOerrors- the errors
-
validateLangCode
protected void validateLangCode(String langCode, org.springframework.validation.Errors errors, String field)
validates langauges request.- Parameters:
langCode- the lang codeerrors- the errorsfield- the field
-
getMaxIrisCount
protected int getMaxIrisCount()
Gets the max iris count.- Returns:
- the max iris count
-
-