Skip to content

Commit

Permalink
MOSIP-29286
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohandey committed Sep 28, 2023
1 parent 973a0e0 commit 307b717
Show file tree
Hide file tree
Showing 12 changed files with 376 additions and 10 deletions.
8 changes: 4 additions & 4 deletions automationtests/src/main/resources/config/Kernel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ ida_db_schema=ida

#----------------------------------AuthDemoService Host properties----------------------------------------------------------#
#To run locally
#authDemoServiceBaseURL=http://localhost
#authDemoServicePort=8082
authDemoServiceBaseURL=http://localhost
authDemoServicePort=8082

#To run in Docker
authDemoServiceBaseURL=http://authdemo.apitestrig
authDemoServicePort=80
#authDemoServiceBaseURL=http://authdemo.apitestrig
#authDemoServicePort=80


#----------------------------------e-Signet properties----------------------------------------------------------#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,35 @@ AddIdentity:
"addressCopy": "Y",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "2023/09/09",
"dateOfBirth": "2023/09/28",
"postalCode": "14022",
"email": "[email protected]",
"phone": "7019858531",
"mobileno": "7019858531",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'
auth_AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: ida/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: ida/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"addressCopy": "Y",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "2023/09/28",
"postalCode": "14022",
"email": "[email protected]",
"phone": "7019858531",
Expand Down Expand Up @@ -937,4 +965,57 @@ AddIdentity:
}'
output: '{
"status":"ACTIVATED"
}'
auth_AddIdentity_no_email_no_phone_sid_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
regenerateHbs: true
restMethod: post
inputTemplate: ida/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: ida/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"addressCopy": "Y",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1970/07/08",
"postalCode": "14022",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'
auth_AddIdentity_withValidParameters_smoke_Pos_without_Email:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: ida/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: ida/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"addressCopy": "Y",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1970/07/08",
"postalCode": "14022",
"phone": "7019858531",
"mobileno": "7019858531",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'
62 changes: 62 additions & 0 deletions automationtests/src/main/resources/ida/AuthLock/createAuthLock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,37 @@ AuthLock:
"maskedMobile": "XXXXXX8531",
"sendOtpResTemplate":"ida/SendOTP/createSendOTPResult"
}
}'
auth_AuthLock_Valid_child_UIN_which_locked:
endPoint: /resident/v1/req/auth-lock
role: resident
restMethod: post
inputTemplate: ida/AuthLock/createAuthLock
outputTemplate: ida/AuthLock/createAuthLockResult
input: '{
"transactionID": "$TRANSACTIONID$",
"individualId": "$ID:AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos_UIN$",
"individualIdType": "UIN",
"requesttime": "$TIMESTAMP$",
"id": "mosip.resident.authlock",
"version": "v1",
"authType": [{auth: "demo"}],
"otp": "$ID:AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos_EMAIL$",
"sendOtp":{
"transactionID": "$TRANSACTIONID$",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos_UIN$",
"individualIdType": "UIN",
"sendOtpReqTemplate": "ida/SendOTP/createSendOTP",
"sendOtpEndPoint": "/resident/v1/req/otp"
}
}'
output: '{
"message": "Notification has been sent to the provided contact detail(s)",
"sendOtpResp":{
"maskedMobile": "XXXXXX8531",
"sendOtpResTemplate":"ida/SendOTP/createSendOTPResult"
}
}'
auth_AuthLock_Valid_UIN_for_bio_auth:
endPoint: /resident/v1/req/auth-lock
Expand Down Expand Up @@ -60,4 +91,35 @@ AuthLock:
"maskedMobile": "XXXXXX8531",
"sendOtpResTemplate":"ida/SendOTP/createSendOTPResult"
}
}'
auth_AuthLock_Valid_UIN_without_phon_email_uin:
endPoint: /resident/v1/req/auth-lock
role: resident
restMethod: post
inputTemplate: ida/AuthLock/createAuthLock
outputTemplate: ida/AuthLock/createAuthLockResult
input: '{
"transactionID": "$TRANSACTIONID$",
"individualId": "$ID:AddIdentity_no_email_no_phone_sid_Pos_UIN$",
"individualIdType": "UIN",
"requesttime": "$TIMESTAMP$",
"id": "mosip.resident.authlock",
"version": "v1",
"authType": [{auth: "bio-Finger"}],
"otp": "$ID:AddIdentity_no_email_no_phone_sid_Pos_EMAIL$",
"sendOtp":{
"transactionID": "$TRANSACTIONID$",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:AddIdentity_no_email_no_phone_sid_Pos_UIN$",
"individualIdType": "UIN",
"sendOtpReqTemplate": "ida/SendOTP/createSendOTP",
"sendOtpEndPoint": "/resident/v1/req/otp"
}
}'
output: '{
"message": "Notification has been sent to the provided contact detail(s)",
"sendOtpResp":{
"maskedMobile": "XXXXXX8531",
"sendOtpResTemplate":"ida/SendOTP/createSendOTPResult"
}
}'
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,37 @@ AuthUnlock:
"sendOtpResTemplate":"ida/SendOTP/createSendOTPResult",
"maskedEmail": "$IGNORE$"
}
}'
auth_AuthUnLock_Valid_UIN_DEMO_UNLOCK_without_phon_email_uin:
endPoint: /resident/v1/req/auth-unlock
role: resident
restMethod: post
inputTemplate: ida/AuthUnLock/createAuthUnLock
outputTemplate: ida/AuthUnLock/createAuthUnLockResult
input: '{
"transactionID": "$TRANSACTIONID$",
"individualId": "$ID:AddIdentity_no_email_no_phone_sid_Pos_UIN$",
"individualIdType": "UIN",
"requesttime": "$TIMESTAMP$",
"id": "mosip.resident.authunlock",
"version": "v1",
"authType": [{auth: "demo"},{auth: "bio-FACE"}],
"otp": "$ID:AddIdentity_no_email_no_phone_sid_Pos_EMAIL$",
"sendOtp":{
"transactionID": "$TRANSACTIONID$",
"requestTime": "$TIMESTAMP$",
"individualId": "$ID:AddIdentity_no_email_no_phone_sid_Pos_UIN$",
"individualIdType": "UIN",
"sendOtpReqTemplate": "ida/SendOTP/createSendOTP",
"sendOtpEndPoint": "/resident/v1/req/otp"
}
}'
output: '{
"registrationId": "$IGNORE$",
"message": "Notification has been sent to the provided contact detail(s)",
"sendOtpResp":{
"maskedMobile": "XXXXXX8531",
"sendOtpResTemplate":"ida/SendOTP/createSendOTPResult",
"maskedEmail": "$IGNORE$"
}
}'
30 changes: 29 additions & 1 deletion automationtests/src/main/resources/ida/BioAuth/BioAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,35 @@ BioAuth:
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "true"
"authStatus": "false"
}'
auth_BioAuth_Biometric_Face_With_Infant_locked_uin_Smoke_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&id=$ID:AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos_UIN$&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/BioAuth/BioAuth
outputTemplate: ida/BioAuth/BioAuthResult
input: '{
"bioSubType": "",
"bioType": "FACE",
"bioValue": "$FACE$",
"deviceCode": "bc0b6848-6d45-46d1-a9bd-b334410bf823",
"dateTime": "$DATETIME$",
"deviceProviderID": "1873299273",
"deviceServiceID": "",
"deviceServiceVersion": "SB.WIN.001",
"deviceProvider": "SYNCBYTE",
"deviceProviderId": "SYNCBYTE.LTC165",
"deviceSubType": "Single",
"make": "Logitech",
"model": "4d36e96c-e325-11ce-bfc1-08002be10318",
"serialNo": "78467171",
"type": "Face",
"transactionId": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "false"
}'
auth_BioAuth_Biometric_RingFinger_With_Valid_uin_Smoke_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&id=$ID:AddIdentity_ValidParam_smoke_Pos_UIN$&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
Expand Down
33 changes: 32 additions & 1 deletion automationtests/src/main/resources/ida/DemoAuth/DemoAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ DemoAuthNew:
}'
output: '{
"authStatus": "true"
}'
auth_DemoAuth_DOB_Valid_Smoke_VID_invalid_transaction_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$&idType=VID&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/DemoAuth/DemoAuth
outputTemplate: ida/DemoAuth/DemoAuthResult
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "1254@#45gg",
"value": "1970/07/08",
"key": "dob"
}'
output: '{
"authStatus": "false"
}'
auth_DemoAuth_DOB_Valid_Smoke_Infant_Uin_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_withValidParameters_Infant_smoke_Pos_UIN$&idType=UIN&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
Expand All @@ -68,13 +83,29 @@ DemoAuthNew:
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$",
"value": "1970/07/08",
"value": "2023/09/28",
"key": "dob"
}'
output: '{
"authStatus": "true"
}'

auth_DemoAuth_DOB_Valid_Smoke_Infant_Uin_which_locked_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos_UIN$&idType=UIN&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/DemoAuth/DemoAuth
outputTemplate: ida/DemoAuth/DemoAuthResult
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$",
"value": "2023/09/28",
"key": "dob"
}'
output: '{
"authStatus": "false"
}'

auth_DemoAuth_DOB_Invalid_Past_Timestamp_VID_Neg:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&requestTime=2022-05-19T06:29:44.809Z&transactionId=$TRANSACTIONID$&id=$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$&idType=VID&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
Expand Down
2 changes: 1 addition & 1 deletion automationtests/src/main/resources/ida/EkycBio/EkycBio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ EkycBio:
"timestamp": "$TIMESTAMP$"
}'
output: '{
"kycStatus": "true"
"kycStatus": "false"
}'
auth_EkycBio_Face_With_draft_uin_Smoke_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:GetDraft_all_valid_smoke_sid_UIN$&isKyc=true&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
Expand Down
2 changes: 1 addition & 1 deletion automationtests/src/main/resources/ida/EkycOtp/EkycOtp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ EkycOtp:
"timestamp": "$TIMESTAMP$"
}'
output: '{
"kycStatus": "true",
"kycStatus": "false",
"sendOtpResp":{
"transactionID": "$IGNORE$",
"maskedMobile": "$IGNORE$",
Expand Down
40 changes: 39 additions & 1 deletion automationtests/src/main/resources/ida/OtpAuth/OtpAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,26 @@ OtpAuth:
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "true",
"authStatus": "false",
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
auth_OTP_Auth_With_Infant_locked_UIN_Smoke_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_withValidParameters_with_Infant_which_locked_smoke_Pos_UIN$&partnerUrlSuffix=$partnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/OtpAuth/OtpAuth
outputTemplate: ida/OtpAuth/OtpAuthResult
input: '{
"otp": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_EMAIL$",
"individualId": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$",
"transactionID": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "false",
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
Expand Down Expand Up @@ -520,4 +539,23 @@ OtpAuth:
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
auth_OTP_Auth_With_Uin_withou_Email_Smoke_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_withValidParameters_smoke_Pos_without_Email_UIN$&partnerUrlSuffix=$partnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/OtpAuth/OtpAuth
outputTemplate: ida/OtpAuth/OtpAuthResult
input: '{
"otp": "$ID:AddIdentity_withValidParameters_smoke_Pos_without_Email_EMAIL$",
"individualId": "$ID:AddIdentity_withValidParameters_smoke_Pos_without_Email_UIN$",
"transactionID": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "false",
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
Loading

0 comments on commit 307b717

Please sign in to comment.