@Component public class IdAuthFilter extends BaseAuthFilter
| Modifier and Type | Field and Description |
|---|---|
protected PartnerService |
partnerService |
publicKeyenv, keyManager, mapper| Constructor and Description |
|---|
IdAuthFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAllowedAuthTypeBasedOnPolicy(Map<String,Object> requestBody,
List<AuthPolicy> authPolicies)
Check allowed auth type for bio based on the policies.
|
protected void |
checkAllowedAuthTypeBasedOnPolicy(String policyId,
Map<String,Object> requestBody)
Check allowed auth type based on policy.
|
protected void |
checkMandatoryAuthTypeBasedOnPolicy(Map<String,Object> requestBody,
List<AuthPolicy> mandatoryAuthPolicies)
Check mandatory auth type based on policy.
|
protected Map<String,Object> |
decipherRequest(Map<String,Object> requestBody)
decipherRequest method is used to get the deciphered request
from the encoded and enciphered request passed by the
authenticating partner.
|
protected String |
extractBioData(String dataFieldValue) |
protected String |
fetchReferenceId()
Method to get the reference id.
|
protected Map<String,String> |
getAuthPart(ResettableStreamHttpServletRequest requestWrapper)
Gets the auth part.
|
protected String |
getBioRefId() |
void |
init(javax.servlet.FilterConfig filterConfig) |
protected boolean |
isAllowedAuthType(String authType,
List<AuthPolicy> policies)
Checks if is allowed auth type.
|
protected boolean |
isAllowedAuthType(String authType,
String subAuthType,
List<AuthPolicy> policies)
Checks if is allowed auth type.
|
protected void |
validateDecipheredRequest(ResettableStreamHttpServletRequest requestWrapper,
Map<String,Object> requestBody)
validateDecipheredRequest - Method used to validate the input stream request
by validating the policy, partner and MISP id of the authenticating partner
once the request is decoded and deciphered.
|
protected boolean |
validateRequestSignature(String signature,
byte[] requestAsByte)
validateSignature method is used to authenticate the request
received from the authenticating partner from the pay load received
which consists of the JSON signature and certificate .
|
authenticateRequest, consumeRequest, decipherAndValidateRequest, decode, encipherResponse, getPayloadFromJwsSingature, transformResponse, validateRequestHMAC, verifyJwsData, verifySignaturedestroy, doFilter, fetchId, getRequestBody, isDate, mapResponse, removeNullOrEmptyFieldsInResponse, setResponseParams, validateId, validateRequestprotected PartnerService partnerService
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterinit in class BaseAuthFilterjavax.servlet.ServletExceptionprotected Map<String,Object> decipherRequest(Map<String,Object> requestBody) throws IdAuthenticationAppException
BaseAuthFilterdecipherRequest in class BaseAuthFilterrequestBody - the encoded and enciphered request bodyIdAuthenticationAppException - the id authentication app exceptionprotected String getBioRefId()
protected String fetchReferenceId()
protected void validateDecipheredRequest(ResettableStreamHttpServletRequest requestWrapper, Map<String,Object> requestBody) throws IdAuthenticationAppException
BaseAuthFiltervalidateDecipheredRequest in class BaseAuthFilterrequestWrapper - ResettableStreamHttpServletRequestrequestBody - the request got after decode and decipher the input streamIdAuthenticationAppException - the id authentication app exceptionprotected String extractBioData(String dataFieldValue) throws IdAuthenticationAppException
IdAuthenticationAppExceptionprotected boolean validateRequestSignature(String signature, byte[] requestAsByte) throws IdAuthenticationAppException
BaseAuthFiltervalidateRequestSignature in class BaseAuthFiltersignature - the JWS serialization received through the requestrequestAsByte - the byte array of the request got after decipherIdAuthenticationAppException - the id authentication app exceptionprotected void checkAllowedAuthTypeBasedOnPolicy(String policyId, Map<String,Object> requestBody) throws IdAuthenticationAppException
policyId - the policy idrequestBody - the request bodyIdAuthenticationAppException - the id authentication app exceptionprotected void checkAllowedAuthTypeBasedOnPolicy(Map<String,Object> requestBody, List<AuthPolicy> authPolicies) throws IdAuthenticationAppException
requestBody - the request bodyauthPolicies - the auth policiesIdAuthenticationAppException - the id authentication app exceptionprotected void checkMandatoryAuthTypeBasedOnPolicy(Map<String,Object> requestBody, List<AuthPolicy> mandatoryAuthPolicies) throws IdAuthenticationAppException
requestBody - the request bodymandatoryAuthPolicies - the mandatory auth policiesIdAuthenticationAppException - the id authentication app exceptionprotected boolean isAllowedAuthType(String authType, List<AuthPolicy> policies)
authType - the auth typepolicies - the policiesprotected boolean isAllowedAuthType(String authType, String subAuthType, List<AuthPolicy> policies)
authType - the auth typesubAuthType - the sub auth typepolicies - the policiesprotected Map<String,String> getAuthPart(ResettableStreamHttpServletRequest requestWrapper)
requestWrapper - the request wrapperCopyright © 2020. All rights reserved.