Skip to content

Commit

Permalink
ES-1043
Browse files Browse the repository at this point in the history
Signed-off-by: ase-101 <[email protected]>
  • Loading branch information
ase-101 committed May 23, 2024
1 parent 4f8743f commit 1827be9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,4 @@ public class KycAuthDto {
private String individualId;

private List<AuthChallenge> challengeList;

private boolean claimMetadataRequired;

public KycAuthDto(String transactionId, String individualId, List<AuthChallenge> challengeList) {
this.transactionId = transactionId;
this.individualId = individualId;
this.challengeList = challengeList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;


@Data
@AllArgsConstructor
Expand All @@ -17,4 +20,5 @@ public class KycAuthResult {

private String kycToken;
private String partnerSpecificUserToken;
private Map<String, List<ClaimMetadata>> claimsMetadata;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package io.mosip.esignet.api.dto;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class VerifiedKycExchangeDto extends KycExchangeDto {

private Map<String, ClaimMetadata> acceptedVerifiedClaims;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,25 @@ SendOtpResult sendOtp(String relyingPartyId, String clientId, SendOtpDto sendOtp
List<KycSigningCertificateData> getAllKycSigningCertificates() throws KycSigningCertificateException;

/**
* Fetch claims metadata
* @param kycToken
* Authenticate and return individual's claims metadata if requested
* @param relyingPartyId
* @param clientId
* @param claimsMetadataRequired
* @param kycAuthDto
* @return
* @throws KycAuthException
*/
KycAuthResult doKycAuth(String relyingPartyId, String clientId, boolean claimsMetadataRequired, KycAuthDto kycAuthDto)
throws KycAuthException;

/**
* Providioned to return verified userinfo based on the provided verification requirement
* @param relyingPartyId
* @param clientId
* @param kycExchangeDto
* @return
* @throws KycExchangeException
*/
Map<String, List<ClaimMetadata>> getClaimMetadata(String partnerSpecificUserToken, String kycToken);
KycExchangeResult doVerifiedKycExchange(String relyingPartyId, String clientId, VerifiedKycExchangeDto kycExchangeDto)
throws KycExchangeException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,13 @@ public List<KycSigningCertificateData> getAllKycSigningCertificates() {
}

@Override
public Map<String, List<ClaimMetadata>> getClaimMetadata(String partnerSpecificUserToken, String kycToken) {
return Map.of();
public KycAuthResult doKycAuth(String relyingPartyId, String clientId, boolean claimsMetadataRequired, KycAuthDto kycAuthDto) throws KycAuthException {
return null;
}

@Override
public KycExchangeResult doVerifiedKycExchange(String relyingPartyId, String clientId, VerifiedKycExchangeDto kycExchangeDto) throws KycExchangeException {
return null;
}

private boolean authenticateUser(String transactionId, String individualId, AuthChallenge authChallenge) {
Expand Down

0 comments on commit 1827be9

Please sign in to comment.