Skip to content

Commit

Permalink
MOSIP-33136
Browse files Browse the repository at this point in the history
Signed-off-by: Nandhukumar <[email protected]>
  • Loading branch information
nandhu-kumar authored and ase-101 committed May 21, 2024
1 parent 58aaf5a commit 2ce0555
Show file tree
Hide file tree
Showing 19 changed files with 213 additions and 293 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,20 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
request.remove(GlobalConstants.IDENTITYREQUEST);
}
identityRequest = buildIdentityRequest(identityRequest);
identityRequest = inputJsonKeyWordHandeler(identityRequest, testCaseName);

JSONObject identityReqJson = new JSONObject(identityRequest);
identityRequestTemplate = identityReqJson.getString("identityRequestTemplate");
identityReqJson.remove("identityRequestTemplate");
identityRequestEncUrl = identityReqJson.getString("identityRequestEncUrl");
identityReqJson.remove("identityRequestEncUrl");

if (identityReqJson.has("transactionId")) {
String oidcTransactionId = AdminTestUtil.getAuthTransactionId(identityReqJson.getString("transactionId"));
if (oidcTransactionId != null && !oidcTransactionId.isBlank())
identityReqJson.put("transactionId", oidcTransactionId);
}

identityRequest = getJsonFromTemplate(identityReqJson.toString(), identityRequestTemplate);
if (identityRequest.contains("$DOMAINURI$")) {
String domainUrl = ApplnURI.replace("api-internal", GlobalConstants.ESIGNET);
Expand Down Expand Up @@ -187,7 +195,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
} catch (SkipException e) {
throw new SkipException(e.getMessage());
} catch (Exception e) {
logger.error(e.getMessage());
throw new AdminTestException(e.getMessage());
}

}
Expand Down
54 changes: 54 additions & 0 deletions apitest/src/main/resources/esignet/AddIdentity/AddIdentity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,33 @@ AddIdentity:
"status":"ACTIVATED"
}'

ESignet_AddIdentity_Linked_Consent_User2_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: esignet/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: esignet/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1992/04/15",
"postalCode": "14022",
"email": "[email protected]",
"phone": "9876543210",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'

ESignet_AddIdentity_Linked_Consent_Vid_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
Expand Down Expand Up @@ -296,6 +323,33 @@ AddIdentity:
"status":"ACTIVATED"
}'

ESignet_AddIdentity_Linked_Consent_User2_Vid_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: esignet/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: esignet/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1992/04/15",
"postalCode": "14022",
"email": "[email protected]",
"phone": "9876543210",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'

ESignet_AddIdentity_BioAuth_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "IDA-OTA-004",
"errorCode": "IDA-OTA-012",
"errorMessage": "$IGNORE$"
}
],
Expand Down Expand Up @@ -749,6 +749,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge_length
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand All @@ -773,7 +774,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "auth_factor_mismatch",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand All @@ -788,6 +789,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_auth_factor_type
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -827,6 +829,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_auth_factor_type
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -890,7 +893,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "auth_factor_mismatch",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand All @@ -905,6 +908,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge_length
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand All @@ -929,7 +933,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "auth_factor_mismatch",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand Down Expand Up @@ -968,7 +972,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "IDA-OTA-004",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand All @@ -983,6 +987,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -1022,6 +1027,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -1085,7 +1091,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "IDA-OTA-004",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand Down Expand Up @@ -1703,7 +1709,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "auth_factor_mismatch",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand All @@ -1718,6 +1724,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_auth_factor_type
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -1757,6 +1764,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_auth_factor_type
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -1796,6 +1804,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge_length
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand All @@ -1820,7 +1829,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "auth_factor_mismatch",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand All @@ -1835,6 +1844,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge_length,invalid_auth_factor_type_format
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand All @@ -1859,7 +1869,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "auth_factor_mismatch",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand Down Expand Up @@ -1898,7 +1908,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "IDA-OTA-004",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand All @@ -1913,6 +1923,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -1952,6 +1963,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand Down Expand Up @@ -1991,6 +2003,7 @@ AuthenticateUser:
endPoint: /v1/esignet/authorization/authenticate
role: resident
restMethod: post
allowedErrorCodes: invalid_challenge_length
checkErrorsOnlyInResponse: true
validityCheckRequired: true
inputTemplate: esignet/AuthenticateUser/AuthenticateUser
Expand All @@ -2015,7 +2028,7 @@ AuthenticateUser:
output: '{
"errors": [
{
"errorCode": "IDA-OTA-004",
"errorCode": "invalid_challenge_length",
"errorMessage": "$IGNORE$"
}
],
Expand Down
Loading

0 comments on commit 2ce0555

Please sign in to comment.