Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES-2147 - Moved 151 changes from develop #1113

Merged
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
Loading