Skip to content

Commit

Permalink
Merge pull request #1124 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-29715
  • Loading branch information
lsivanand authored Oct 11, 2023
2 parents 209275b + b6a70c3 commit ab1e75e
Show file tree
Hide file tree
Showing 10 changed files with 471 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,67 +204,69 @@ OAuthDetailsRequestVCINegTC:
}
]
}'
# Removing this test case till we address multiple errors in the error section
# ESignet_OAuthDetailsRequest_VCI_uin_Empty_Code_Challenge_Method_Neg:
# endPoint: /v1/esignet/authorization/v2/oauth-details
# role: resident
# restMethod: post
# checkErrorsOnlyInResponse: true
# inputTemplate: esignet/VCINegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
# outputTemplate: esignet/error
# input: '{
# "requestTime": "$TIMESTAMP$",
# "clientId": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
# "scope": "mosip_identity_vc_ldp",
# "responseType": "code",
# "redirectUri": "$IDPREDIRECTURI$",
# "display": "popup",
# "prompt": "login",
# "acrValues": "mosip:idp:acr:generated-code mosip:idp:acr:linked-wallet mosip:idp:acr:biometrics",
# "nonce": "973eieljzng",
# "state": "eree2311",
# "claimsLocales": "en",
# "codeChallenge": "$CODECHALLENGE$",
# "codeChallengeMethod": ""
#}'
# output: '{
# "errors": [
# {
# "errorCode": "invalid_pkce_challenge"
# },
#
# ]
#}'

# ESignet_OAuthDetailsRequest_VCI_uin_SpaceVal_Code_Challenge_Method_Neg:
# endPoint: /v1/esignet/authorization/v2/oauth-details
# role: resident
# restMethod: post
# checkErrorsOnlyInResponse: true
# inputTemplate: esignet/VCINegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
# outputTemplate: esignet/error
# input: '{
# "requestTime": "$TIMESTAMP$",
# "clientId": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
# "scope": "mosip_identity_vc_ldp",
# "responseType": "code",
# "redirectUri": "$IDPREDIRECTURI$",
# "display": "popup",
# "prompt": "login",
# "acrValues": "mosip:idp:acr:generated-code mosip:idp:acr:linked-wallet mosip:idp:acr:biometrics",
# "nonce": "973eieljzng",
# "state": "eree2311",
# "claimsLocales": "en",
# "codeChallenge": "$CODECHALLENGE$",
# "codeChallengeMethod": " "
#}'
# output: '{
# "errors": [
# {
# "errorCode": "invalid_pkce_challenge"
# }
# ]
#}'
ESignet_OAuthDetailsRequest_VCI_uin_Empty_Code_Challenge_Method_Neg:
endPoint: /v1/esignet/authorization/v2/oauth-details
role: resident
restMethod: post
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
checkErrorsOnlyInResponse: true
inputTemplate: esignet/VCINegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"scope": "mosip_identity_vc_ldp",
"responseType": "code",
"redirectUri": "$IDPREDIRECTURI$",
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code mosip:idp:acr:linked-wallet mosip:idp:acr:biometrics",
"nonce": "973eieljzng",
"state": "eree2311",
"claimsLocales": "en",
"codeChallenge": "$CODECHALLENGE$",
"codeChallengeMethod": ""
}'
output: '{
"errors": [
{
"errorCode": "invalid_pkce_challenge"
},

]
}'

ESignet_OAuthDetailsRequest_VCI_uin_SpaceVal_Code_Challenge_Method_Neg:
endPoint: /v1/esignet/authorization/v2/oauth-details
role: resident
restMethod: post
allowedErrorCodes: unsupported_pkce_challenge_method,invalid_pkce_challenge
checkErrorsOnlyInResponse: true
inputTemplate: esignet/VCINegTC/OAuthDetailsRequestVCI/OAuthDetailsRequestVCI
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"scope": "mosip_identity_vc_ldp",
"responseType": "code",
"redirectUri": "$IDPREDIRECTURI$",
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code mosip:idp:acr:linked-wallet mosip:idp:acr:biometrics",
"nonce": "973eieljzng",
"state": "eree2311",
"claimsLocales": "en",
"codeChallenge": "$CODECHALLENGE$",
"codeChallengeMethod": " "
}'
output: '{
"errors": [
{
"errorCode": "invalid_pkce_challenge"
}
]
}'

ESignet_OAuthDetailsRequest_VCI_uin_Long_Code_Challenge_Pos:
endPoint: /v1/esignet/authorization/v2/oauth-details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,4 +393,103 @@ AuthenticateUserVCIVidNegTC:
"sendOtpResTemplate":"esignet/SendOtp/SendOtpResult",
"maskedEmail": "$IGNORE$"
}
}'

ESignet_AuthenticateUserVCI_Vid_Otp_NegCredScen1_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_NegCredScen1_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen1_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_NegCredScen1_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen1_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_NegCredScen2_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_NegCredScen2_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen2_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_NegCredScen2_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen2_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_NegCredScen3_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_NegCredScen3_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen3_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_NegCredScen3_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen3_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 @@ -193,4 +193,52 @@ AuthorizationCodeVCIVidNegTC:
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_Hash_CodeChallenge_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_Vid_NegCredScen1_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_NegCredScen1_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen1_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_Vid_NegCredScen2_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_NegCredScen2_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen2_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'

ESignet_AuthorizationCode_VCI_Vid_NegCredScen3_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_NegCredScen3_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:OAuthDetailsRequest_VCI_Vid_NegCredScen3_Valid_Smoke_sid_transactionId$"
}'
output: '{
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"client_id": "{{client_id}}",
"idpAccessToken": "{{idpAccessToken}}",
"format": "{{format}}",
"credential_definition" : {
"type": [
{{#each type}}
"{{types}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
"@context": [
{{#each @context}}
"{{context}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
},
"proof": {
"proof_type": "{{proof_type}}",
"jwt": "{{proof_jwt}}"
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"client_id": "{{client_id}}",
"idpAccessToken": "{{idpAccessToken}}",
"format": "{{format}}",
"credential_definition" : {},
"proof": {
"proof_type": "{{proof_type}}",
"jwt": "{{proof_jwt}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"client_id": "{{client_id}}",
"idpAccessToken": "{{idpAccessToken}}",
"format": "{{format}}",
"credential_definition" : "{{credential_definition}}",
"proof": {
"proof_type": "{{proof_type}}",
"jwt": "{{proof_jwt}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"client_id": "{{client_id}}",
"idpAccessToken": "{{idpAccessToken}}",
"format": "{{format}}",
"credential_definition" : {
"type": [
{{#each type}}
"{{types}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
"@context": [
{{#each @context}}
"{{context}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit ab1e75e

Please sign in to comment.