Skip to content

Commit

Permalink
MOSIP-37134
Browse files Browse the repository at this point in the history
Signed-off-by: Sohan Kumar Dey <[email protected]>
  • Loading branch information
Sohandey committed Nov 6, 2024
1 parent 0d08ee1 commit 8816776
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad

logger.info("******Post request Json to EndPointUrl: " + ApplnURI + testCaseDTO.getEndPoint() + " *******");

if(testCaseName.contains("_expiredOTP")) {
try {
Thread.sleep(180000);
} catch (NumberFormatException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}

response = postRequestWithCookieAuthHeaderAndSignature(ApplnURI + testCaseDTO.getEndPoint(), authRequest, COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName());

Map<String, List<OutputValidationDto>> ouputValid = OutputValidationUtil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3888,7 +3888,7 @@ MultiFactorAuth:
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/MultiFactorAuth/MultiFactorAuth
outputTemplate: ida/MultiFactorAuth/MultiFactorAuthResult
outputTemplate: ida/MultiFactorAuth/error
input: '{
"otpChannel": "$ID:AddIdentity_ValidParam_smoke_Pos_EMAIL$",
"requestTime": "$TIMESTAMP$",
Expand Down Expand Up @@ -3930,7 +3930,7 @@ MultiFactorAuth:
}
}'
output: '{
"authStatus": true,
"authStatus": false,
"sendOtpResp":{
"errors": [
{
Expand Down
69 changes: 52 additions & 17 deletions api-test/src/main/resources/ida/OtpAuth/OtpAuth2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -944,41 +944,76 @@ OtpAuth:
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/OtpAuth/OtpAuth
outputTemplate: ida/OtpAuth/OtpAuthResult
outputTemplate: ida/OtpAuth/error
input: '{
"otpChannel": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_EMAIL$",
"otp": "12S34@@!#",
"individualId": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$",
"transactionID": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
"otpChannel": "26363633",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$",
"transactionId": "$TRANSACTIONID$",
"individualIdType": "VID",
"bio": false,
"demo": false,
"otp": true,
"sendOtp":{
"transactionID": "$TRANSACTIONID$",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$",
"individualIdType": "VID",
"sendOtpReqTemplate": "ida/OtpAuth/sendOtp",
"sendOtpEndPoint": "/idauthentication/v1/otp/$partnerKeyURL$",
"otpIdentyEnryptRequestPath": "ida/OtpAuth/OtpIdentityEncrypt.json"
}
}'
output: '{
"authStatus": "false",
"sendOtpResp":{
"errors": [
{
"errorCode": "IDA-MLC-001"
}
],
"authStatus": false,
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
auth_OTP_Auth_With_WRONG_OTP:
endPoint: /idauthentication/v1/auth/$partnerKeyURL$
description: Otp auth with wrong OTP
description: Otp auth with invalid OTP
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/OtpAuth/OtpAuth
outputTemplate: ida/OtpAuth/OtpAuthResult
outputTemplate: ida/OtpAuth/error
input: '{
"otpChannel": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_EMAIL$",
"otp": "128276454",
"individualId": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$",
"transactionID": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
"otpChannel": "263@#$63633",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$",
"transactionId": "$TRANSACTIONID$",
"individualIdType": "VID",
"bio": false,
"demo": false,
"otp": true,
"sendOtp":{
"transactionID": "$TRANSACTIONID$",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$",
"individualIdType": "VID",
"sendOtpReqTemplate": "ida/OtpAuth/sendOtp",
"sendOtpEndPoint": "/idauthentication/v1/otp/$partnerKeyURL$",
"otpIdentyEnryptRequestPath": "ida/OtpAuth/OtpIdentityEncrypt.json"
}
}'
output: '{
"authStatus": "false",
"sendOtpResp":{
"errors": [
{
"errorCode": "IDA-MLC-001"
}
],
"authStatus": false,
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'

auth_OTP_Auth_With_IRIS_as_true_anddo_auth_policy:
endPoint: /idauthentication/v1/auth/$partnerKeyURL$
description: invalid scenario
Expand Down

0 comments on commit 8816776

Please sign in to comment.