Skip to content

Commit

Permalink
ES-2147 - Moved 151 changes from develop (#1113)
Browse files Browse the repository at this point in the history
* MOSIP-36485

Signed-off-by: Nandhukumar <[email protected]>

* MOSIP-36485

Signed-off-by: Nandhukumar <[email protected]>

* MOSIP-36485

Signed-off-by: Nandhukumar <[email protected]>

* ES-2147

Signed-off-by: Nandhukumar <[email protected]>

* ES-2147

Signed-off-by: Nandhukumar <[email protected]>

---------

Signed-off-by: Nandhukumar <[email protected]>
  • Loading branch information
nandhu-kumar authored Jan 17, 2025
1 parent a776872 commit 27983d9
Show file tree
Hide file tree
Showing 12 changed files with 212 additions and 209 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public void test(TestCaseDTO testCaseDTO)
//tempUrl = ApplnURI.replace(GlobalConstants.API_INTERNAL, ConfigManager.getSunBirdBaseURL());
testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace("$SUNBIRDBASEURL$", ""));
}
inputJson = EsignetUtil.inputstringKeyWordHandeler(inputJson, testCaseName);
if ((testCaseName.contains("_AuthorizationCode_")) || (testCaseName.contains("_AuthToken_Xsrf_"))) {
response = postRequestWithCookieAuthHeaderAndXsrfTokenForAutoGenId(
tempUrl + testCaseDTO.getEndPoint(), inputJson, COOKIENAME, testCaseDTO.getTestCaseName(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.mosip.testrig.apirig.esignet.utils;

import java.util.Arrays;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -235,9 +236,14 @@ public static String isTestCaseValidForExecution(TestCaseDTO testCaseDTO) {
}

public static String inputstringKeyWordHandeler(String jsonString, String testCaseName) {
if (jsonString.contains(GlobalConstants.TIMESTAMP))
if (jsonString.contains(GlobalConstants.TIMESTAMP)) {
jsonString = replaceKeywordValue(jsonString, GlobalConstants.TIMESTAMP, generateCurrentUTCTimeStamp());
}

if (jsonString.contains("$UNIQUENONCEVALUEFORESIGNET$")) {
jsonString = replaceKeywordValue(jsonString, "$UNIQUENONCEVALUEFORESIGNET$",
String.valueOf(Calendar.getInstance().getTimeInMillis()));
}

return jsonString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "invalid_challenge_length",
"errorCode": "invalid_auth_factor_type",
"errorMessage": "$IGNORE$"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -41,7 +41,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -66,7 +66,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -91,7 +91,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -116,7 +116,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -141,7 +141,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -166,7 +166,7 @@ OAuthDetailsRequestConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:generated-code",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OAuthDetailsRequestLinkedConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:linked-wallet",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -41,7 +41,7 @@ OAuthDetailsRequestLinkedConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:linked-wallet",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
Expand All @@ -55,7 +55,7 @@ OAuthDetailsRequestLinkedConsent:
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: esignet/OAuthDetailsRequest/OAuthDetailsRequestNoClaims
inputTemplate: esignet/OAuthDetailsRequest/OAuthDetailsRequestNullClaims
outputTemplate: esignet/OAuthDetailsRequest/OAuthDetailsRequestResult
input: '{
"requestTime": "$TIMESTAMP$",
Expand All @@ -66,10 +66,40 @@ OAuthDetailsRequestLinkedConsent:
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:linked-wallet",
"nonce": "973eieljzng",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
output: '{

}'

ESignet_OAuthDetailsRequest_LinkAuth_Consent_NoClaim_Neg:
endPoint: /v1/esignet/authorization/oauth-details
description: Oauthdetails request with linkAuth consent and empty claim
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: esignet/OAuthDetailsRequest/OAuthDetailsRequestNoClaims
outputTemplate: esignet/OAuthDetailsRequest/OAuthDetailsRequestResult
input: '{
"requestTime": "$TIMESTAMP$",
"clientId": "$ID:CreateOIDCClient_all_Valid_Smoke_sid_clientId$",
"scope": "openid resident-service profile",
"responseType": "code",
"redirectUri": "$IDPREDIRECTURI$",
"display": "popup",
"prompt": "login",
"acrValues": "mosip:idp:acr:linked-wallet",
"nonce": "$UNIQUENONCEVALUEFORESIGNET$",
"state": "eree2311",
"claimsLocales": "en"
}'
output: '{
"errors": [
{
"errorCode": "invalid_claim",
"errorMessage": "$IGNORE$"
}
]
}'
Loading

0 comments on commit 27983d9

Please sign in to comment.