Class DefaultInternalFilter
- java.lang.Object
-
- io.mosip.authentication.common.service.filter.BaseIDAFilter
-
- io.mosip.authentication.common.service.filter.BaseAuthFilter
-
- io.mosip.authentication.common.service.filter.IdAuthFilter
-
- io.mosip.authentication.common.service.filter.InternalAuthFilter
-
- io.mosip.authentication.common.service.filter.DefaultInternalFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
DefaultAuthTypeFilter,InternalEventNotificationFilter,InternalOtpFilter
@Component public class DefaultInternalFilter extends InternalAuthFilter
The Class OTPFilter.- Author:
- Manoj SP
-
-
Field Summary
-
Fields inherited from class io.mosip.authentication.common.service.filter.IdAuthFilter
partnerService
-
Fields inherited from class io.mosip.authentication.common.service.filter.BaseIDAFilter
env, keyManager, mapper
-
-
Constructor Summary
Constructors Constructor Description DefaultInternalFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckAllowedAuthTypeBasedOnPolicy(Map<String,Object> requestBody, List<AuthPolicy> authPolicies)Check allowed auth type for bio based on the policies.protected voidcheckMandatoryAuthTypeBasedOnPolicy(Map<String,Object> requestBody, List<AuthPolicy> mandatoryAuthPolicies)Check mandatory auth type based on policy.protected voiddecipherAndValidateRequest(ResettableStreamHttpServletRequest requestWrapper, Map<String,Object> requestBody)Decipher and validate request - Method used to decipher the input stream request and validate it usingBaseAuthFilter.validateDecipheredRequest(io.mosip.authentication.common.service.filter.ResettableStreamHttpServletRequest,java.util.Map<java.lang.String,java.lang.Object>)method.protected StringfetchId(ResettableStreamHttpServletRequest requestWrapper, String attribute)Fetch id.protected booleanneedStoreAnonymousProfile()protected booleanneedStoreAuthTransaction()protected Map<String,Object>removeNullOrEmptyFieldsInResponse(Map<String,Object> responseMap)This method is used to construct the response for OTP by removing the null values-
Methods inherited from class io.mosip.authentication.common.service.filter.InternalAuthFilter
extractBioData, fetchReferenceId, getBioRefId, isAMRValidationRequired, isBiometricHashValidationDisabled, isCertificateValidationRequired, isMispPolicyValidationRequired, isSignatureVerificationRequired, isSigningRequired, isTrustValidationRequired, validateDecipheredRequest
-
Methods inherited from class io.mosip.authentication.common.service.filter.IdAuthFilter
checkAllowedAMRForKBT, checkAllowedAMRForKeyBindedToken, checkAllowedAuthTypeBasedOnPolicy, checkAllowedAuthTypeForKeyBindedToken, checkAllowedAuthTypeForPassword, checkMispPolicyAllowed, decipherDigitalId, decipherRequest, getAuthPart, getSystemSupportedLanguageCodes, init, isAllowedAuthType, isAllowedAuthType, isPartnerCertificateNeeded, isThumbprintValidationRequired, processDecipheredReqeuest
-
Methods inherited from class io.mosip.authentication.common.service.filter.BaseAuthFilter
authenticateRequest, consumeRequest, decode, getPayloadFromJwsSingature, validateRequestHMAC, verifyBioDataSignature, verifySignature
-
Methods inherited from class io.mosip.authentication.common.service.filter.BaseIDAFilter
consumeResponse, destroy, doFilter, getRequestBody, isDate, validateId, validateRequest
-
-
-
-
Method Detail
-
decipherAndValidateRequest
protected void decipherAndValidateRequest(ResettableStreamHttpServletRequest requestWrapper, Map<String,Object> requestBody) throws IdAuthenticationAppException
Description copied from class:BaseAuthFilterDecipher and validate request - Method used to decipher the input stream request and validate it usingBaseAuthFilter.validateDecipheredRequest(io.mosip.authentication.common.service.filter.ResettableStreamHttpServletRequest,java.util.Map<java.lang.String,java.lang.Object>)method.- Overrides:
decipherAndValidateRequestin classBaseAuthFilter- Parameters:
requestWrapper- the request wrapperrequestBody- the request body- Throws:
IdAuthenticationAppException- the id authentication app exception
-
checkAllowedAuthTypeBasedOnPolicy
protected void checkAllowedAuthTypeBasedOnPolicy(Map<String,Object> requestBody, List<AuthPolicy> authPolicies) throws IdAuthenticationAppException
Description copied from class:IdAuthFilterCheck allowed auth type for bio based on the policies.- Overrides:
checkAllowedAuthTypeBasedOnPolicyin classIdAuthFilter- Parameters:
requestBody- the request bodyauthPolicies- the auth policies- Throws:
IdAuthenticationAppException- the id authentication app exception
-
removeNullOrEmptyFieldsInResponse
protected Map<String,Object> removeNullOrEmptyFieldsInResponse(Map<String,Object> responseMap)
This method is used to construct the response for OTP by removing the null values- Overrides:
removeNullOrEmptyFieldsInResponsein classBaseIDAFilter- Parameters:
responseMap- the response map- Returns:
- the map
-
checkMandatoryAuthTypeBasedOnPolicy
protected void checkMandatoryAuthTypeBasedOnPolicy(Map<String,Object> requestBody, List<AuthPolicy> mandatoryAuthPolicies) throws IdAuthenticationAppException
Description copied from class:IdAuthFilterCheck mandatory auth type based on policy.- Overrides:
checkMandatoryAuthTypeBasedOnPolicyin classIdAuthFilter- Parameters:
requestBody- the request bodymandatoryAuthPolicies- the mandatory auth policies- Throws:
IdAuthenticationAppException- the id authentication app exception
-
fetchId
protected String fetchId(ResettableStreamHttpServletRequest requestWrapper, String attribute)
Description copied from class:InternalAuthFilterFetch id.- Overrides:
fetchIdin classInternalAuthFilter- Parameters:
requestWrapper- the request wrapperattribute- the attribute- Returns:
- the string
-
needStoreAuthTransaction
protected boolean needStoreAuthTransaction()
- Overrides:
needStoreAuthTransactionin classInternalAuthFilter
-
needStoreAnonymousProfile
protected boolean needStoreAnonymousProfile()
- Overrides:
needStoreAnonymousProfilein classInternalAuthFilter
-
-