Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohandey committed Nov 7, 2023
2 parents 4075c13 + 754996d commit 3d7c9cc
Show file tree
Hide file tree
Showing 15 changed files with 687 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ public class AdminTestUtil extends BaseTestCase {
+ Calendar.getInstance().getTimeInMillis();
public static final String RANDOM_ID_2 = "mosip" + generateRandomNumberString(2)
+ Calendar.getInstance().getTimeInMillis();
public static final String RANDOM_ID_V2 = "mosip" + generateRandomNumberString(2)
+ Calendar.getInstance().getTimeInMillis();
public static final String TRANSACTION_ID = generateRandomNumberString(10);
public static final String AUTHORIZATHION_HEADERNAME = GlobalConstants.AUTHORIZATION;
public static final String AUTH_HEADER_VALUE = "Some String";
Expand Down Expand Up @@ -3052,6 +3054,7 @@ public String inputJsonKeyWordHandeler(String jsonString, String testCaseName) {
jsonString = replaceKeywordWithValue(jsonString, "$IDENTITYJSON$", generateIdentityJson(testCaseName));
}
if (jsonString.contains("$RANDOMID$")) {
jsonString = replaceKeywordWithValue(jsonString, "$RANDOMID$V2", RANDOM_ID_V2);
jsonString = replaceKeywordWithValue(jsonString, "$RANDOMID$2", RANDOM_ID_2);
jsonString = replaceKeywordWithValue(jsonString, "$RANDOMID$", RANDOM_ID);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ private static SessionFactory getDataBaseConnectionSessionFactory(String dbName)

if(dbName.equalsIgnoreCase("partner"))
dbschema=ConfigManager.getValueForKey("ida_db_schema");

if(dbName.equalsIgnoreCase("master"))
dbschema=ConfigManager.getValueForKey("master_db_schema");

try {
Configuration config = new Configuration();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"requestTime": "{{requestTime}}",
"request": {
"clientId": "{{clientId}}",
"clientName": "{{clientName}}",
"publicKey": {{publicKey}},
"relyingPartyId": "{{relyingPartyId}}",
"userClaims": [
"{{userClaims1}}",
"{{userClaims2}}",
"{{userClaims3}}",
"{{userClaims4}}",
"{{userClaims5}}"
],
"authContextRefs": [
{{#each authContextRefs}}
"{{acrValues}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
"logoUri": "{{logoUri}}",
"redirectUris": [
"{{redirectUris}}"
],
"grantTypes": [
"{{grantTypes}}"
],
"clientAuthMethods": [
"{{clientAuthMethods}}"
],
"clientNameLangMap": {
"{{keyLang1}}": "{{clientNameLang}}"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
CreateOIDCClientV2:
ESignet_CreateOIDCClientV2_all_Valid_Smoke_sid:
endPoint: /v1/esignet/client-mgmt/v2/oidc-client
role: partner
restMethod: post
inputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClient
outputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClientResult
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$RANDOMID$V2",
"clientName": "MOSIP OIDC Client",
"logoUri": "https://health-services.com/logo.png",
"relyingPartyId": "Bharathi-Inc",
"redirectUris": "$IDPREDIRECTURI$",
"publicKey": "$JWKKEY$",
"userClaims1": "name",
"userClaims2": "email",
"userClaims3": "gender",
"userClaims4": "phone_number",
"userClaims5": "birthdate",
"authContextRefs": [{acrValues: "mosip:idp:acr:static-code"},{acrValues: "mosip:idp:acr:generated-code"},{acrValues: "mosip:idp:acr:biometrics"}],
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt",
"keyLang1": "$1STLANG$",
"clientNameLang": "MOSIP OIDC Client"
}'
output: '{
"clientId": "$IGNORE$",
"status": "ACTIVE"
}'

ESignet_CreateOIDCClientV2_Invalid_langCode_Size_Neg:
endPoint: /v1/esignet/client-mgmt/v2/oidc-client
role: partner
restMethod: post
inputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClient
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$RANDOMID$V2",
"clientName": "MOSIP OIDC Client",
"logoUri": "https://health-services.com/logo.png",
"relyingPartyId": "Bharathi-Inc",
"redirectUris": "$IDPREDIRECTURI$",
"publicKey": "$JWKKEY$",
"userClaims1": "name",
"userClaims2": "email",
"userClaims3": "gender",
"userClaims4": "phone_number",
"userClaims5": "birthdate",
"authContextRefs": [{acrValues: "mosip:idp:acr:static-code"},{acrValues: "mosip:idp:acr:generated-code"},{acrValues: "mosip:idp:acr:biometrics"}],
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt",
"keyLang1": "mhsdfsfd",
"clientNameLang": "MOSIP OIDC Client"
}'
output: '{
"errors": [
{
"errorCode": "invalid_language_code"
}
]
}'

ESignet_CreateOIDCClientV2_Invalid_langCode_Neg:
endPoint: /v1/esignet/client-mgmt/v2/oidc-client
role: partner
restMethod: post
inputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClient
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$RANDOMID$V2",
"clientName": "MOSIP OIDC Client",
"logoUri": "https://health-services.com/logo.png",
"relyingPartyId": "Bharathi-Inc",
"redirectUris": "$IDPREDIRECTURI$",
"publicKey": "$JWKKEY$",
"userClaims1": "name",
"userClaims2": "email",
"userClaims3": "gender",
"userClaims4": "phone_number",
"userClaims5": "birthdate",
"authContextRefs": [{acrValues: "mosip:idp:acr:static-code"},{acrValues: "mosip:idp:acr:generated-code"},{acrValues: "mosip:idp:acr:biometrics"}],
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt",
"keyLang1": "abc",
"clientNameLang": "MOSIP OIDC Client"
}'
output: '{
"errors": [
{
"errorCode": "invalid_language_code"
}
]
}'

ESignet_CreateOIDCClientV2_Invalid_clientNameLang_Neg:
endPoint: /v1/esignet/client-mgmt/v2/oidc-client
role: partner
restMethod: post
inputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClient
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$RANDOMID$V2",
"clientName": "MOSIP OIDC Client",
"logoUri": "https://health-services.com/logo.png",
"relyingPartyId": "Bharathi-Inc",
"redirectUris": "$IDPREDIRECTURI$",
"publicKey": "$JWKKEY$",
"userClaims1": "name",
"userClaims2": "email",
"userClaims3": "gender",
"userClaims4": "phone_number",
"userClaims5": "birthdate",
"authContextRefs": [{acrValues: "mosip:idp:acr:static-code"},{acrValues: "mosip:idp:acr:generated-code"},{acrValues: "mosip:idp:acr:biometrics"}],
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt",
"keyLang1": "$1STLANG$",
"clientNameLang": ""
}'
output: '{
"errors": [
{
"errorCode": "invalid_client_name_value"
}
]
}'

ESignet_CreateOIDCClientV2_Missing_ClientNamelangMap_Value_Neg:
endPoint: /v1/esignet/client-mgmt/v2/oidc-client
role: partner
restMethod: post
inputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClientWOClientLangMapValue
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$RANDOMID$V2",
"clientName": "MOSIP OIDC Client",
"logoUri": "https://health-services.com/logo.png",
"relyingPartyId": "Bharathi-Inc",
"redirectUris": "$IDPREDIRECTURI$",
"publicKey": "$JWKKEY$",
"userClaims1": "name",
"userClaims2": "email",
"userClaims3": "gender",
"userClaims4": "phone_number",
"userClaims5": "birthdate",
"authContextRefs": [{acrValues: "mosip:idp:acr:static-code"},{acrValues: "mosip:idp:acr:generated-code"},{acrValues: "mosip:idp:acr:biometrics"}],
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errors": [
{
"errorCode": "invalid_client_name_value"
}
]
}'

ESignet_CreateOIDCClientV2_Missing_ClientNamelangMap_Neg:
endPoint: /v1/esignet/client-mgmt/v2/oidc-client
role: partner
restMethod: post
inputTemplate: esignet/CreateOIDCClientV2/CreateOIDCClientWOClientLangMap
outputTemplate: esignet/error
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$RANDOMID$V2",
"clientName": "MOSIP OIDC Client",
"logoUri": "https://health-services.com/logo.png",
"relyingPartyId": "Bharathi-Inc",
"redirectUris": "$IDPREDIRECTURI$",
"publicKey": "$JWKKEY$",
"userClaims1": "name",
"userClaims2": "email",
"userClaims3": "gender",
"userClaims4": "phone_number",
"userClaims5": "birthdate",
"authContextRefs": [{acrValues: "mosip:idp:acr:static-code"},{acrValues: "mosip:idp:acr:generated-code"},{acrValues: "mosip:idp:acr:biometrics"}],
"grantTypes": "authorization_code",
"clientAuthMethods": "private_key_jwt"
}'
output: '{
"errors": [
{
"errorCode": "invalid_client_name_value"
}
]
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"response": {
"clientId": "{{clientId}}",
"status": "{{status}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"requestTime": "{{requestTime}}",
"request": {
"clientId": "{{clientId}}",
"clientName": "{{clientName}}",
"publicKey": {{publicKey}},
"relyingPartyId": "{{relyingPartyId}}",
"userClaims": [
"{{userClaims1}}",
"{{userClaims2}}",
"{{userClaims3}}",
"{{userClaims4}}",
"{{userClaims5}}"
],
"authContextRefs": [
{{#each authContextRefs}}
"{{acrValues}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
"logoUri": "{{logoUri}}",
"redirectUris": [
"{{redirectUris}}"
],
"grantTypes": [
"{{grantTypes}}"
],
"clientAuthMethods": [
"{{clientAuthMethods}}"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"requestTime": "{{requestTime}}",
"request": {
"clientId": "{{clientId}}",
"clientName": "{{clientName}}",
"publicKey": {{publicKey}},
"relyingPartyId": "{{relyingPartyId}}",
"userClaims": [
"{{userClaims1}}",
"{{userClaims2}}",
"{{userClaims3}}",
"{{userClaims4}}",
"{{userClaims5}}"
],
"authContextRefs": [
{{#each authContextRefs}}
"{{acrValues}}"
{{#unless @last}},{{/unless}}
{{/each}}
],
"logoUri": "{{logoUri}}",
"redirectUris": [
"{{redirectUris}}"
],
"grantTypes": [
"{{grantTypes}}"
],
"clientAuthMethods": [
"{{clientAuthMethods}}"
],
"clientNameLangMap": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"requestTime": "{{requestTime}}",
"request": {
"clientId": "{{clientId}}",
"scope": "{{scope}}",
"responseType": "{{responseType}}",
"redirectUri": "{{redirectUri}}",
"display": "{{display}}",
"prompt": "{{prompt}}",
"acrValues": "{{acrValues}}",
"nonce" : "{{nonce}}",
"state" : "{{state}}",
"claimsLocales" : "{{claimsLocales}}",
"codeChallenge" : "{{codeChallenge}}",
"codeChallengeMethod" : "{{codeChallengeMethod}}"
}
}
Loading

0 comments on commit 3d7c9cc

Please sign in to comment.