Skip to content

Commit

Permalink
Merge pull request #1106 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-29513
  • Loading branch information
Sohandey authored Oct 6, 2023
2 parents 821d1b2 + 2fd7da9 commit 32a76e9
Show file tree
Hide file tree
Showing 8 changed files with 435 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,39 @@ AuthenticateUserVCIVidNegTC:
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_Diff_Scope_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_Diff_Scope_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_Diff_Scope_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_Vid_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_Diff_Scope_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_Diff_Scope_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_NegAuthCodeScen5_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
Expand Down Expand Up @@ -228,4 +261,136 @@ AuthenticateUserVCIVidNegTC:
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_NegTokenScen1_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_Vid_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_NegTokenScen2_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_Vid_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_NegTokenScen3_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_Vid_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_Hash_CodeChallenge_Valid_Smoke:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCI
outputTemplate: esignet/VCIVidNegTC/AuthenticateUserVCI/AuthenticateUserVCIResultResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"authFactorType" : "OTP",
"challenge" : "$ID:AddIdentity_Valid_Params_VCI_Vid_Inv_Scen_smoke_Pos_EMAIL$",
"sendOtp":{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_transactionId$",
"individualId": "$ID:Generate_Perpetual_VID_VCI_Invalid_Scen_Smoke_sid_vid$",
"otpChannels": [{channel: "email"},{channel: "phone"}],
"sendOtpReqTemplate": "esignet/SendOtp/SendOtp",
"sendOtpEndPoint": "/v1/esignet/authorization/send-otp"
}
}'
output: '{
"sendOtpResp":{
"maskedMobile": "XXXXXX3210",
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,68 @@ AuthorizationCodeVCIVidNegTC:
"errorCode": "invalid_accepted_claim"
}
]
}'

ESignet_AuthorizationCode_VCI_Vid_NegTokenScen1_Valid_Smoke_sid:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCIResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_Vid_NegTokenScen2_Valid_Smoke_sid:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCIResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_Vid_NegTokenScen3_Valid_Smoke_sid:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCIResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid:
endPoint: /v1/esignet/authorization/auth-code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCI
outputTemplate: esignet/VCIVidNegTC/AuthorizationCodeVCI/AuthorizationCodeVCIResult
input: '{
"encodedHash": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"grant_type": "{{grant_type}}",
"code": "{{code}}",
"client_id": "{{client_id}}",
"client_assertion_type": "{{client_assertion_type}}",
"client_assertion": "{{client_assertion}}",
"redirect_uri": "{{redirect_uri}}",
"code_verifier": "{{code_verifier}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
GenerateTokenVCIVidNegTC:
ESignet_GenerateTokenVCI_Vid_NegTokenScen1_Invalid_code_verifier:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/error2
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_NegTokenScen1_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "sdgfhss"
}'
output: '{
"error": "pkce_failed"
}'

ESignet_GenerateTokenVCI_Vid_NegTokenScen2_Empty_code_verifier:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/error2
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_NegTokenScen2_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": ""
}'
output: '{
"error": "invalid_pkce_code_verifier"
}'

ESignet_GenerateTokenVCI_Vid_NegTokenScen3_NoHash_code_verifier:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/error2
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_NegTokenScen3_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"
}'
output: '{
"error": "pkce_failed"
}'

ESignet_GenerateTokenVCI_Vid_Invalid_Hash_CodeChallenge:
endPoint: /v1/esignet/oauth/v2/token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: esignet/VCIVidNegTC/GenerateTokenVCI/GenerateTokenVCI
outputTemplate: esignet/error2
input: '{
"grant_type": "authorization_code",
"code": "$ID:AuthorizationCode_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_code$",
"client_id": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "$CODEVERIFIER$"
}'
output: '{
"error": "pkce_failed"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"token_type": "{{token_type}}"
}
Loading

0 comments on commit 32a76e9

Please sign in to comment.