web.identity-mgt.forgot_accountId_finish.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.wso2.carbon.identity.mgt.ui Show documentation
Show all versions of org.wso2.carbon.identity.mgt.ui Show documentation
A custom wso2 products or solution
The newest version!
<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
<%@ page import="org.wso2.carbon.CarbonConstants" %>
<%@ page import="org.wso2.carbon.identity.mgt.stub.beans.UserMgtBean" %>
<%@ page import="org.wso2.carbon.identity.mgt.stub.dto.UserEvidenceDTO" %>
<%@ page import="org.wso2.carbon.identity.mgt.ui.IdentityManagementClient" %>
<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>
<%
boolean success = false;
String email = request.getParameter("emailAddress");
String lastName = request.getParameter("lastName");
UserEvidenceDTO dto1 = new UserEvidenceDTO();
UserEvidenceDTO dto2 = new UserEvidenceDTO();
dto1.setClaimUri("http://wso2.org/claims/emailaddress");
dto1.setClaimValue(email);
dto2.setClaimUri("http://wso2.org/claims/lastname");
dto2.setClaimValue(lastName);
bean.setUserEvidenceDTOs(new UserEvidenceDTO[]{dto1, dto2});
try{
String cookie = (String) session
.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(),
session);
ConfigurationContext configContext = (ConfigurationContext) config
.getServletContext()
.getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
IdentityManagementClient client =
new IdentityManagementClient(cookie, backendServerURL, configContext);
success = client.processAccountRecovery(bean);
} catch (Exception ignore) {
}
%>
<%
if(success){
%>
<%
} else {
%>
<%
}
%>