diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/auth/testscripts/MultiFactorAuthNew.java b/api-test/src/main/java/io/mosip/testrig/apirig/auth/testscripts/MultiFactorAuthNew.java index a2b9cdb6ab..84c23c8478 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/auth/testscripts/MultiFactorAuthNew.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/auth/testscripts/MultiFactorAuthNew.java @@ -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> ouputValid = OutputValidationUtil diff --git a/api-test/src/main/resources/ida/MultiFactorAuth/MultiFactorAuth2.yml b/api-test/src/main/resources/ida/MultiFactorAuth/MultiFactorAuth2.yml index 73d4a5e80c..dd21dfef53 100644 --- a/api-test/src/main/resources/ida/MultiFactorAuth/MultiFactorAuth2.yml +++ b/api-test/src/main/resources/ida/MultiFactorAuth/MultiFactorAuth2.yml @@ -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$", @@ -3930,7 +3930,7 @@ MultiFactorAuth: } }' output: '{ - "authStatus": true, + "authStatus": false, "sendOtpResp":{ "errors": [ { diff --git a/api-test/src/main/resources/ida/OtpAuth/OtpAuth2.yml b/api-test/src/main/resources/ida/OtpAuth/OtpAuth2.yml index 9e0a25f210..d9d8a98c22 100644 --- a/api-test/src/main/resources/ida/OtpAuth/OtpAuth2.yml +++ b/api-test/src/main/resources/ida/OtpAuth/OtpAuth2.yml @@ -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