Class 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 Detail

      • idInfoHelper

        @Autowired
        protected IdInfoHelper idInfoHelper
        The id info helper.
      • idInfoFetcher

        @Autowired
        protected IdInfoFetcher idInfoFetcher
        The id info helper.
    • Constructor Detail

      • BaseAuthRequestValidator

        public BaseAuthRequestValidator()
    • 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 req
        errors - the errors
      • validateAdditionalFactorsDetails

        protected void validateAdditionalFactorsDetails​(AuthRequestDTO authRequestDTO,
                                                        org.springframework.validation.Errors errors)
        validates the Static Pin Details.
        Parameters:
        authRequestDTO - the auth request DTO
        errors - 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 DTO
        errors - the errors
        allowedAuthType - 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 request
        errors - the errors
      • validateAuthType

        protected void validateAuthType​(AuthRequestDTO authRequestDto,
                                        org.springframework.validation.Errors errors)
        Validates the AuthType.
        Parameters:
        authType - the auth type
        errors - the errors
      • validateAllowedAuthTypes

        protected void validateAllowedAuthTypes​(AuthRequestDTO requestDTO,
                                                org.springframework.validation.Errors errors)
        Method to validate auth type.
        Parameters:
        requestDTO - the request DTO
        errors - the errors
      • validateLangCode

        protected void validateLangCode​(String langCode,
                                        org.springframework.validation.Errors errors,
                                        String field)
        validates langauges request.
        Parameters:
        langCode - the lang code
        errors - the errors
        field - the field
      • getMaxIrisCount

        protected int getMaxIrisCount()
        Gets the max iris count.
        Returns:
        the max iris count