Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/mosip/id-authentication
Browse files Browse the repository at this point in the history
…into MOSIP-28837-request-otp-notifications-are-coming-in-3-languages-even-when-preferred-lang-is-only-one
  • Loading branch information
Neha Farheen committed Jan 29, 2024
2 parents 0f29cec + 278b3b7 commit 1169fb1
Showing 1 changed file with 5 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ private void audit(String username, Action action, ActionStatus status, AuditDTO
auditRequest.setApplicationName(ESIGNET);
auditRequest.setSessionUserId(StringUtils.isEmpty(username)?"no-user":username);
auditRequest.setSessionUserName(StringUtils.isEmpty(username)?"no-user":username);
auditRequest.setIdType(TRANSACTION);
auditRequest.setIdType(audit.getIdType());
auditRequest.setCreatedBy(this.getClass().getSimpleName());
auditRequest.setModuleName(getModuleByAction(action));
auditRequest.setModuleId(getModuleByAction(action));
auditRequest.setModuleName(action.getModule());
auditRequest.setModuleId(action.getModule());
auditRequest.setDescription(getAuditDescription(audit));
auditRequest.setId(audit.getTransactionId());

Expand Down Expand Up @@ -120,40 +120,9 @@ private String getAuditDescription(AuditDTO audit) throws JSONException {
json.put("state", audit.getState());
json.put("codeHash", audit.getCodeHash());
json.put("accessTokenHash", audit.getAccessTokenHash());
json.put("linkCodeHash", audit.getLinkedCodeHash());
json.put("linkTransactionId", audit.getLinkedTransactionId());
return json.toString();
}

private String getModuleByAction(Action action) {
switch (action) {
case OIDC_CLIENT_CREATE:
case OIDC_CLIENT_UPDATE:
return "ClientManagementController";
case GET_OAUTH_DETAILS:
case TRANSACTION_STARTED:
case SEND_OTP:
case AUTHENTICATE:
case GET_AUTH_CODE:
case DO_KYC_AUTH:
case DO_KYC_EXCHANGE:
return "AuthorizationController";
case GENERATE_TOKEN:
return "OAuthController";
case GET_USERINFO:
return "OpenIdConnectController";
case LINK_AUTH_CODE:
case LINK_AUTHENTICATE:
case LINK_CODE:
case LINK_SEND_OTP:
case LINK_STATUS:
case LINK_TRANSACTION:
case SAVE_CONSENT:
return "LinkedAuthorizationController";
case GET_CERTIFICATE:
case UPLOAD_CERTIFICATE:
return "SystemInfoController";
default:
return "EsignetService";
}
}

}

0 comments on commit 1169fb1

Please sign in to comment.