All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.identity-mgt.forgot_accountId_finish.jsp Maven / Gradle / Ivy

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 { %>

.

<% } %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy