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

web.identity-mgt.update_credential.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.captcha.mgt.beans.xsd.CaptchaInfoBean" %>
<%@ page import="org.wso2.carbon.identity.mgt.stub.beans.VerificationBean" %>
<%@ page import="org.wso2.carbon.identity.mgt.ui.IdentityManagementClient" %>
<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
<%@ page import="org.owasp.encoder.Encode" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %>





<%
    String userName = null;
    String secretKey = null;
    
    VerificationBean bean = (VerificationBean) session.getAttribute("confirmationBean");
    if(bean != null){
        userName = bean.getUserId();
        secretKey = bean.getKey();
    }
    session.removeAttribute("confirmationBean");

    if (userName != null && secretKey != null) {
        CaptchaInfoBean captchaInfoBean;
        try {
            String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(),
                    session);
            ConfigurationContext configContext = (ConfigurationContext) config
                    .getServletContext()
                    .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
            IdentityManagementClient client =
                    new IdentityManagementClient(backendServerURL, configContext) ;
            captchaInfoBean = client.generateRandomCaptcha();
        } catch (Exception e) {
    %>
    

<% return; } String captchaImagePath = captchaInfoBean.getImagePath(); String captchaImageUrl = "../../" + captchaImagePath; String captchaSecretKey = captchaInfoBean.getSecretKey(); if ("failed".equals(session.getAttribute("captcha-status"))) { session.setAttribute("captcha-status", null); %> <% } %> <% if ("true".equals(session.getAttribute("update-credentials-failed"))) { session.removeAttribute("update-credentials-failed"); %> <% } %>

*
(Minimum of 6 Characters in length)
*
*
<% } else { %>

.

<% } %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy