Skip to content

Commit

Permalink
Update file names
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashmini committed Oct 15, 2023
1 parent 8172bc7 commit 1bcb368
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.api.PasswordRecoveryApiV2" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.passwordrecovery.v2.*" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.api.RecoveryApiV2" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.recovery.v2.*" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.api.UsernameRecoveryApi" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.*" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointConstants" %>
Expand Down Expand Up @@ -93,13 +93,13 @@
RecoveryInitRequest recoveryInitRequest = new RecoveryInitRequest();
recoveryInitRequest.setClaims(claimDTOList);
PasswordRecoveryApiV2 passwordRecoveryApiV2 = new PasswordRecoveryApiV2();
RecoveryApiV2 recoveryApiV2 = new RecoveryApiV2();
try {
Map<String, String> requestHeaders = new HashedMap();
if (recaptchaResponse != null) {
requestHeaders.put("g-recaptcha-response", recaptchaResponse);
}
List<AccountRecoveryType> accountRecoveryTypes = passwordRecoveryApiV2.
List<AccountRecoveryType> accountRecoveryTypes = recoveryApiV2.
initiatePasswordRecovery(recoveryInitRequest, tenantDomain, requestHeaders);
if (accountRecoveryTypes == null) {
request.setAttribute("callback", callback);
Expand All @@ -108,7 +108,7 @@
response);
return;
}
IdentityManagementEndpointUtil.addReCaptchaHeaders(request, passwordRecoveryApiV2.getApiClient().getResponseHeaders());
IdentityManagementEndpointUtil.addReCaptchaHeaders(request, recoveryApiV2.getApiClient().getResponseHeaders());
for (AccountRecoveryType accountRecoveryType : accountRecoveryTypes) {
if (accountRecoveryType.getMode().equals("recoverWithNotifications")) {
isNotificationBasedRecoveryEnabled = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointUtil" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.ApiException" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.api.UsernameRecoveryApi" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.api.PasswordRecoveryApiV2" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.api.RecoveryApiV2" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.Claim" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.UserClaim" %>
<%@ page import="org.wso2.carbon.user.core.util.UserCoreUtil" %>
Expand All @@ -35,7 +35,7 @@
<%@ page import="java.util.Map" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.Property" %>
<%@ page import="java.net.URLEncoder" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.passwordrecovery.v2.*" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.model.recovery.v2.*" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.PreferenceRetrievalClient" %>
<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.PreferenceRetrievalClientException" %>

Expand Down Expand Up @@ -165,14 +165,14 @@
String recoveryCode = request.getParameter("recoveryCode");
String notificationChannel = "";
PasswordRecoveryApiV2 passwordRecoveryApiV2 = new PasswordRecoveryApiV2();
RecoveryApiV2 recoveryApiV2 = new RecoveryApiV2();
if (recoveryOption.equals("SECURITY_QUESTIONS")) {
username = IdentityManagementEndpointUtil.getFullQualifiedUsername(username, tenantDomain, null);
request.setAttribute("callback", callback);
request.setAttribute("sessionDataKey", sessionDataKey);
request.setAttribute("username", username);
session.setAttribute("username", username);
IdentityManagementEndpointUtil.addReCaptchaHeaders(request, passwordRecoveryApiV2.
IdentityManagementEndpointUtil.addReCaptchaHeaders(request, recoveryApiV2.
getApiClient().getResponseHeaders());
request.getRequestDispatcher("challenge-question-request.jsp?username=" + username).forward(request,
response);
Expand All @@ -195,7 +195,7 @@
recoveryRequest.setRecoveryCode(recoveryCode);
try {
Map<String, String> requestHeaders = new HashedMap();
RecoveryResponse recoveryResponse = passwordRecoveryApiV2.recoverPassword(recoveryRequest,
RecoveryResponse recoveryResponse = recoveryApiV2.recoverPassword(recoveryRequest,
tenantDomain, requestHeaders);
notificationChannel = recoveryResponse.getNotificationChannel();
request.setAttribute("callback", callback);
Expand Down

0 comments on commit 1bcb368

Please sign in to comment.