Skip to content

Commit

Permalink
Merge pull request mosip#96 from likhitharl/develop
Browse files Browse the repository at this point in the history
INJICERT-213- Negative testcases
  • Loading branch information
ckm007 authored Nov 15, 2024
2 parents 3bfe7bc + 442febe commit 4214d39
Show file tree
Hide file tree
Showing 26 changed files with 1,047 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apitest/src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ passwordToReset=12341234_AaB
XSRFTOKEN=7d01b2a8-b89d-41ad-9361-d7f6294021d1
codeChallenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
codeVerifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
policyNumberForSunBirdRC=1234-56789-1011
policyNumberForSunBirdRC=948108765
challengeValueForSunBirdRC=eyJmdWxsTmFtZSI6IlNhbmNoaSBTaW5naCIsImRvYiI6IjE5OTgtMDEtMjQifQ==
fullNameForSunBirdRC=Sanchi Singh
dobForSunBirdRC=1998-01-24
fullNameForSunBirdRC=Baldev
dobForSunBirdRC=1988-12-21
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
AuthenticateUserSunBirdC:
InjiCertify_ESignet_AuthenticateUserSunBirdC_Valid_Smoke:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/authorization/authenticate
uniqueIdentifier: TC_esignetDependent_AuthenticateUser
description: Authenticate User
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
AuthorizationCodeSunBirdC:
InjiCertify_ESignet_AuthorizationCode_SunBirdC_All_Valid_Smoke_sid:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/authorization/auth-code
uniqueIdentifier: TC_esignetDependent_AuthorizationCode
description: Authorization Code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CreateOIDCClientV2SunBirdC:
InjiCertify_ESignet_CreateOIDCClientV2SunBirdC_all_Valid_Smoke_sid:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/client-mgmt/oauth-client
uniqueIdentifier: TC_esignetDependent_CreateOidc
description: Create OIDC client
role: partner
restMethod: post
inputTemplate: injicertify/SunBirdC/CreateOIDCClientV2SunBirdC/CreateOIDCClientV2SunBirdC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
GenerateTokenSunBirdC:
InjiCertify_ESignet_GenerateTokenSunBirdC_Valid_Smoke_sid:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/oauth/v2/token
uniqueIdentifier: TC_esignetDependent_GenerateToken
description: Generate Token
role: resident
restMethod: post
validityCheckRequired: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
GetCredentialSunBirdC:
InjiCertify_GetCredentialSunBirdC_IdpAccessToken_all_Valid_Smoke:
endPoint: $INJICERTIFYINSURANCEBASEURL$/v1/certify/issuance/credential
uniqueIdentifier: TC_injicertify_credentialissuance
description: Get sunbird VC with valid details
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
OAuthDetailsRequestSunBirdC:
InjiCertify_ESignet_OAuthDetailsRequest_SunBirdC_all_Valid_Smoke_sid:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/authorization/v2/oauth-details
uniqueIdentifier: TC_esignetDependent_OAuthdetailsRequest
description: OAuth details request
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
GetCredentialSunBirdCForVd11:
InjiCertify_GetCredentialSunBirdCForVd11_IdpAccessToken_all_Valid_Smoke:
endPoint: $INJICERTIFYINSURANCEBASEURL$/v1/certify/issuance/vd11/credential
uniqueIdentifier: TC_injicertify_credentialissuance_Vd11
description: Get sunbird VC with valid details
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
GetCredentialSunBirdCForVd12:
InjiCertify_GetCredentialSunBirdCForVd12_IdpAccessToken_all_Valid_Smoke:
endPoint: $INJICERTIFYINSURANCEBASEURL$/v1/certify/issuance/vd12/credential
uniqueIdentifier: TC_injicertify_credentialissuance_Vd12
description: Get sunbird VC with valid details
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"encodedHash": "{{encodedHash}}",
"requestTime": "{{requestTime}}",
"request": {
"transactionId": "{{transactionId}}",
"individualId": "{{individualId}}",
"challengeList" : [
{
"authFactorType" : "{{authFactorType}}",
"challenge" : "{{challenge}}",
"format": "{{format}}"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
AuthenticateUserSunBirdCNeg:
InjiCertify_ESignet_AuthenticateUserSunBirdC_Valid_Smoke_Neg:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/authorization/authenticate
uniqueIdentifier: TC_esignetDependent_AuthenticateUserNeg
description: Authenticate User
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: injicertify/SunBirdCNegative/AuthenticateUserSunBirdCNeg/AuthenticateUserSunBirdCNeg
outputTemplate: injicertify/SunBirdCNegative/AuthenticateUserSunBirdCNeg/AuthenticateUserSunBirdCResultNeg
input: '{
"encodedHash": "$ID:ESignet_OAuthDetailsRequest_SunBirdC_all_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:ESignet_OAuthDetailsRequest_SunBirdC_all_Valid_Smoke_sid_transactionId$",
"individualId": "$POLICYNUMBERFORSUNBIRDRC$",
"authFactorType" : "KBA",
"challenge" : "$CHALLENGEVALUEFORSUNBIRDC$",
"format": "base64url-encoded-json"
}'
output: '{
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"encodedHash": "{{encodedHash}}",
"requestTime": "{{requestTime}}",
"request": {
"transactionId": "{{transactionId}}",
"acceptedClaims": [
{{#each acceptedClaims}}
"{{claim}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
"permittedAuthorizeScopes": [
{{#each permittedAuthorizeScopes}}
"{{scope}}"
{{#unless @last}},{{/unless}}
{{/each}}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
AuthorizationCodeSunBirdCNeg:
InjiCertify_ESignet_AuthorizationCode_SunBirdC_All_Valid_Smoke_sid_Neg:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/authorization/auth-code
uniqueIdentifier: TC_esignetDependent_AuthorizationCodeNeg
description: Authorization Code
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: injicertify/SunBirdCNegative/AuthorizationCodeSunBirdCNeg/AuthorizationCodeSunBirdCNeg
outputTemplate: injicertify/SunBirdCNegative/AuthorizationCodeSunBirdCNeg/AuthorizationCodeSunBirdCResultNeg
input: '{
"encodedHash": "$ID:ESignet_OAuthDetailsRequest_SunBirdC_all_Valid_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:ESignet_OAuthDetailsRequest_SunBirdC_all_Valid_Smoke_sid_transactionId$",
"permittedAuthorizeScopes": [{scope: "sunbird_rc_insurance_vc_ldp"}]
}'
output: '{
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
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,22 @@
GenerateTokenSunBirdCNeg:
InjiCertify_ESignet_GenerateTokenSunBirdC_Valid_Smoke_sid_Neg:
endPoint: $ESIGNETMOCKBASEURL$/v1/esignet/oauth/v2/token
uniqueIdentifier: TC_esignetDependent_GenerateTokenNeg
description: Generate Token
role: resident
restMethod: post
validityCheckRequired: true
inputTemplate: injicertify/SunBirdCNegative/GenerateTokenSunBirdCNeg/GenerateTokenSunBirdCNeg
outputTemplate: injicertify/SunBirdCNegative/GenerateTokenSunBirdCNeg/GenerateTokenSunBirdCResultNeg
input: '{
"grant_type": "authorization_code",
"code": "$ID:ESignet_AuthorizationCode_SunBirdC_All_Valid_Smoke_sid_code$",
"client_id": "$ID:ESignet_CreateOIDCClientV2SunBirdC_all_Valid_Smoke_sid_clientId$",
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": "$CLIENT_ASSERTION_USER4_JWK$",
"redirect_uri": "$IDPREDIRECTURI$",
"code_verifier": "$CODEVERIFIER$"
}'
output: '{
"token_type": "Bearer"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"token_type": "{{token_type}}"
}
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}}"
}
}
Loading

0 comments on commit 4214d39

Please sign in to comment.