Skip to content

Commit

Permalink
[RENAMED] KBA to KBI, and error msg to challenge_format
Browse files Browse the repository at this point in the history
Signed-off-by: Zeeshan Mehboob <zeeshan.mehboob@infosys.com>
  • Loading branch information
zesu22 committed Dec 3, 2024
1 parent a315e14 commit ef1781a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void setUp() throws Exception {
supportedKycAuthFormats.put("PIN", List.of("number"));
supportedKycAuthFormats.put("BIO", List.of("encoded-json"));
supportedKycAuthFormats.put("WLA", List.of("jwt"));
supportedKycAuthFormats.put("KBA", List.of("base64url-encoded-json"));
supportedKycAuthFormats.put("KBI", List.of("base64url-encoded-json"));
supportedKycAuthFormats.put("PWD", List.of("alpha-numeric"));

// Get the field
Expand Down Expand Up @@ -309,15 +309,15 @@ public void doKycAuthMock_withInValidAuthChallenge_thenFail() {

KycAuthDto kycAuthDto = new KycAuthDto(); // Assume this is properly initialized
AuthChallenge authChallenge = new AuthChallenge();
authChallenge.setAuthFactorType("KBA");
authChallenge.setAuthFactorType("KBI");
authChallenge.setChallenge("e3dq.2ef.3ww23");
authChallenge.setFormat("jwt");
kycAuthDto.setChallengeList(List.of(authChallenge));

try{
mockHelperService.doKycAuthMock("relyingPartyId", "clientId", kycAuthDto, true);
}catch (KycAuthException e){
Assert.assertEquals(e.getErrorCode(),"invalid_auth_challenge");
Assert.assertEquals(e.getErrorCode(),"invalid_challenge_format");
}
}

Expand Down

0 comments on commit ef1781a

Please sign in to comment.