Interface KycService
public interface KycService
This interface is used to retrieve Kyc information of individual
- Author:
- Sanjay Murali
-
Method Summary
Modifier and TypeMethodDescriptionbuildKycExchangeResponse(String subject, Map<String, List<IdentityInfoDTO>> idInfo, List<String> consentedAttributes, List<String> locales, String idVid, KycExchangeRequestDTO kycExchangeRequestDTO) Method to build kyc exchange response to return user claims.generateAndSaveKycToken(String idHash, String authToken, String oidcClientId, String requestTime, String tokenGenerationTime, String reqTransactionId) Method used to generate the KYC Token after successful authentication and store the kyc token details in DB.booleanisKycTokenExpire(LocalDateTime tokenIssuedDateTime, String kycToken) Method used to validate the input KYC Token is expired or not.retrieveKycInfo(List<String> eKycTypeAttributes, Set<String> langCodes, Map<String, List<IdentityInfoDTO>> identityInfo) Method used to retrieve the KYC information as per the policy
-
Method Details
-
retrieveKycInfo
EKycResponseDTO retrieveKycInfo(List<String> eKycTypeAttributes, Set<String> langCodes, Map<String, List<IdentityInfoDTO>> identityInfo) throws IdAuthenticationBusinessExceptionMethod used to retrieve the KYC information as per the policy- Parameters:
eKycTypeAttributes- the policy described for partneridentityInfo- the information contains personal information of the residentuin- the individualId of the ResidentsecLangCode- - secondary language code to be sent if details need- Returns:
- the kycResponseDTO consists of the KYC Information of the resident
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
generateAndSaveKycToken
String generateAndSaveKycToken(String idHash, String authToken, String oidcClientId, String requestTime, String tokenGenerationTime, String reqTransactionId) throws IdAuthenticationBusinessException Method used to generate the KYC Token after successful authentication and store the kyc token details in DB.- Parameters:
idHash- Id Hash of the inputted IdauthToken- Partner specific User TokenoidcClientId- OIDC Client IdrequestTime- Auth Request TimetokenGenerationTime- Token Generation TimereqTransactionId- Request Transaction Id- Returns:
- the String generated Kyc Token
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
isKycTokenExpire
boolean isKycTokenExpire(LocalDateTime tokenIssuedDateTime, String kycToken) throws IdAuthenticationBusinessException Method used to validate the input KYC Token is expired or not.- Parameters:
tokenIssuedDateTime- Token Issued DataTimekycToken- The KYC Token- Returns:
- void
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
buildKycExchangeResponse
String buildKycExchangeResponse(String subject, Map<String, List<IdentityInfoDTO>> idInfo, List<String> consentedAttributes, List<String> locales, String idVid, KycExchangeRequestDTO kycExchangeRequestDTO) throws IdAuthenticationBusinessExceptionMethod to build kyc exchange response to return user claims.- Parameters:
subject- Partner Specific token as subject for user claimsidInfo- List of Identity Info of the user.consentedAttributes- Consented Attributes.locales- selected locales.idVid- individual Id- Returns:
- String
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-