Skip to content

Commit

Permalink
Merge pull request #1131 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-29770
  • Loading branch information
lsivanand authored Oct 13, 2023
2 parents e1eca5f + c594169 commit c92bfbc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void test(TestCaseDTO testCaseDTO)
ouputValid.put("expected vs actual", List.of(customResponse));
}else {
ouputValid = OutputValidationUtil.doJsonOutputValidation(
response.asString(), getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()), testCaseDTO.isCheckErrorsOnlyInResponse());
response.asString(), getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()), testCaseDTO.isCheckErrorsOnlyInResponse(), testCaseDTO.getAllowedErrorCodes());
}
Reporter.log(ReportUtil.getOutputValidationReport(ouputValid));
if (!OutputValidationUtil.publishOutputResult(ouputValid))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ LinkedAuthenticationWla:
}
}'
output: '{
"consentAction": "NOCAPTURE",
"consentAction": "CAPTURE",
"sendOtpResp":{
"maskedMobile": "$IGNORE$",
"sendOtpResTemplate":"esignet/SendBindingOtp/SendBindingOtpResult",
Expand Down Expand Up @@ -90,7 +90,7 @@ LinkedAuthenticationWla:
}
}'
output: '{
"consentAction": "NOCAPTURE",
"consentAction": "CAPTURE",
"sendOtpResp":{
"maskedMobile": "$IGNORE$",
"sendOtpResTemplate":"esignet/SendBindingOtp/SendBindingOtpResult",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,38 @@
LinkedAuthorizationConsent:
ESignet_LinkedAuthorizationConsent_Consent_uin_SameClaim_Invalid_Neg:
ESignet_LinkedAuthorizationConsent_Consent_uin_SameClaim_Pos:
endPoint: /v1/esignet/linked-authorization/v2/consent
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/LinkedConsent/LinkAuthorizationConsent/LinkAuthorizationConsent
outputTemplate: esignet/error
outputTemplate: esignet/LinkedAuthorizationConsent/LinkedAuthorizationConsentResult
input: '{
"requestTime": "$TIMESTAMP$",
"linkedTransactionId": "$ID:LinkTransaction_Consent_uin_SameClaim_all_Valid_Smoke_sid_linkTransactionId$",
"acceptedClaims": [{claim: "name"},{claim: "email"}],
"signature": "$CONSENTDETACHEDSIGNATURESAMECLAIM$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "$IGNORE$"
}
]
}'

ESignet_LinkedAuthorizationConsent_Consent_Vid_SameClaim_Invalid_Neg:
ESignet_LinkedAuthorizationConsent_Consent_Vid_SameClaim_Pos:
endPoint: /v1/esignet/linked-authorization/v2/consent
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/LinkedConsent/LinkAuthorizationConsent/LinkAuthorizationConsent
outputTemplate: esignet/error
outputTemplate: esignet/LinkedAuthorizationConsent/LinkedAuthorizationConsentResult
input: '{
"requestTime": "$TIMESTAMP$",
"linkedTransactionId": "$ID:LinkTransaction_Consent_Vid_SameClaim_all_Valid_Smoke_sid_linkTransactionId$",
"acceptedClaims": [{claim: "name"},{claim: "gender"},{claim: "email"}],
"signature": "$CONSENTDETACHEDSIGNATUREVIDSAMECLAIM$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "$IGNORE$"
}
]
}'

ESignet_LinkedAuthorizationConsent_All_Valid_Smoke_sid:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ SendOtp:
endPoint: /v1/esignet/authorization/send-otp
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/SendOtp/SendOtp
outputTemplate: esignet/SendOtp/SendOtpResult
Expand All @@ -52,8 +53,6 @@ SendOtp:
"otpChannels": [{channel: "email"},{channel: "phone"}]
}'
output: '{
"maskedEmail": "$IGNORE$",
"maskedMobile": "$IGNORE$"
}'

ESignet_SendOtp_Vid_all_Valid_Smoke:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ OAuthDetailsRequestVCINegTC:
endPoint: /v1/esignet/authorization/v2/oauth-details
role: resident
restMethod: post
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
checkErrorsOnlyInResponse: true
inputTemplate: esignet/VCINegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
outputTemplate: esignet/error
Expand All @@ -232,7 +232,7 @@ OAuthDetailsRequestVCINegTC:
"errors": [
{
"errorCode": "invalid_pkce_challenge"
},
}

]
}'
Expand All @@ -241,7 +241,7 @@ OAuthDetailsRequestVCINegTC:
endPoint: /v1/esignet/authorization/v2/oauth-details
role: resident
restMethod: post
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
checkErrorsOnlyInResponse: true
inputTemplate: esignet/VCINegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
outputTemplate: esignet/error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ OAuthDetailsRequestVCIVidNegTC:
endPoint: /v1/esignet/authorization/v2/oauth-details
role: resident
restMethod: post
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
checkErrorsOnlyInResponse: true
inputTemplate: esignet/VCIVidNegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
outputTemplate: esignet/error
Expand Down Expand Up @@ -241,7 +241,7 @@ OAuthDetailsRequestVCIVidNegTC:
endPoint: /v1/esignet/authorization/v2/oauth-details
role: resident
restMethod: post
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
checkErrorsOnlyInResponse: true
inputTemplate: esignet/VCIVidNegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
outputTemplate: esignet/error
Expand Down

0 comments on commit c92bfbc

Please sign in to comment.