Package com.adito.security

Examples of com.adito.security.SessionInfo


  public ActionForward commit(ActionMapping mapping,
                              ActionForm form,
                              HttpServletRequest request,
                              HttpServletResponse response) throws Exception {
    ReplacementForm rf = (ReplacementForm)form;
    SessionInfo info = this.getSessionInfo(request);
   
    if (null == rf.getReplacement().getMatchPattern() ||"".equals(rf.getReplacement().getMatchPattern())) {
        ActionMessages mesgs = new ActionMessages();   
        mesgs.add(Globals.MESSAGE_KEY, new ActionMessage("createReplacement.error.noMatchPattern"));
        saveErrors(request, mesgs);
View Full Code Here


        rep1.setReplacePattern(rep2.getReplacePattern());
        rep2.setMatchPattern(matchPattern1);
        rep2.setMimeType(mimeType1);
        rep2.setSitePattern(sitePattern1);
        rep2.setReplacePattern(replacePattern1);
        SessionInfo info = this.getSessionInfo(request);
        try {
            WebForwardDatabaseFactory.getInstance().updateReplacement(rep1);
            CoreServlet.getServlet().fireCoreEvent(
                new CoreEvent(this, WebForwardEventConstants.REPLACEMENT_PRECEDENCE_CHANGED, null, info, CoreEvent.STATE_SUCCESSFUL).addAttribute(
                                WebForwardEventConstants.EVENT_ATTR_REPLACEMENT_TYPE, String.valueOf(rep1.getReplaceType())));
View Full Code Here

        if (sel.size() == 0) {
            ActionMessages errs = new ActionMessages();
            errs.add(Globals.ERROR_KEY, new ActionMessage("replacements.error.noReplacementsSelectedToDelete"));
            saveErrors(request, errs);
        } else {
            SessionInfo info = this.getSessionInfo(request);
            for (Iterator i = sel.iterator(); i.hasNext();) {
                Replacement r = (Replacement) i.next();
                try {
                    WebForwardDatabaseFactory.getInstance().deleteReplacement(r.getSequence());
                    CoreServlet.getServlet().fireCoreEvent(
View Full Code Here

    /* (non-Javadoc)
     * @see com.adito.wizard.actions.AbstractWizardAction#createWizardSequence(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
    protected AbstractWizardSequence createWizardSequence(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        ActionForward fwd = mapping.findForward("finish");
        SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
        DefaultWizardSequence seq = new DefaultWizardSequence(fwd, "webForwards", "webForwardWizard", CoreUtil.getReferer(request), "webForwardWizard", session);
        seq.putAttribute(ATTR_USER, LogonControllerFactory.getInstance().getUser(request));
        seq.addStep(new WizardStep("/webForwardTypeSelection.do", true));
        seq.addStep(new WizardStep("/webForwardResourceDetails.do"));
        seq.addStep(new WizardStep("/webForwardSpecificDetails.do"));
View Full Code Here

                            .getProperty(new SystemConfigKey("webServer.validExternalHostnames")));
            validExternalHostnames.setAsPropertyText(validExternalHostnamesAsTextFieldText);
            invalidHostnameAction = (String) sequence.getAttribute(ATTR_INVALID_HOSTNAME_ACTION, Property
                            .getProperty(new SystemConfigKey("webServer.invalidHostnameAction")));
            PropertyList pl = PropertyList.createFromTextFieldText(listeningInterfaces);
            SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
            model = new MultiSelectSelectionModel(session, new InterfacesMultiSelectListDataSource(), pl);
        } catch (Exception e) {
            log.error("Failed to initialise form.");
        }
    }
View Full Code Here

            // }
            /*
             * Configure HTTP proxy. Supported by both Java API and Maverick
             * HTTP.
             */
            SessionInfo sessionInfo = getSessionInfo(request);
            if (useHTTPProxy) {
                Property.setProperty(new ContextKey("proxies.http.proxyHost"), (String) seq.getAttribute(
                    ConfigureProxiesForm.ATTR_HTTP_PROXY_HOSTNAME, ""), sessionInfo);
                Property.setProperty(new ContextKey("proxies.http.proxyPort"), (String) seq.getAttribute(
                    ConfigureProxiesForm.ATTR_HTTP_PROXY_PORT, ""), sessionInfo);
View Full Code Here

        return l;
    }

    private void resetUser(HttpServletRequest request, User user) throws Exception {
        boolean disabled = !PolicyUtil.isEnabled(user);
        SessionInfo session = this.getSessionInfo(request);
        if (disabled) {
            if (log.isInfoEnabled())
                log.info("Re-enabling user " + user.getPrincipalName());
            PolicyUtil.setEnabled(user, true, null, session);
        }
View Full Code Here

                RequestHandlerResponse response) {
    /*
     * When not authenticated, dont reverse proxy anything. We use the logon
     * ticket to get the HttpSession in use
     */
    SessionInfo session = null;
   
    Cookie[] cookies = request.getCookies();
    String sessionId = null;
   
    if (cookies != null) {
View Full Code Here

     * @see com.adito.navigation.FavoriteResourceType#createWrappedFavoriteItem(int,
     *      javax.servlet.http.HttpServletRequest, java.lang.String)
     */
    public WrappedFavoriteItem createWrappedFavoriteItem(int resourceId, HttpServletRequest request, String type) throws Exception {
        WebForward wf = WebForwardDatabaseFactory.getInstance().getWebForward(resourceId);
        SessionInfo sessionInfo = LogonControllerFactory.getInstance().getSessionInfo(request);
        WebForwardItem wfi;
        String hostField = request.getHeader("Host");
        HostService aditoHost = hostField == null ? null : new HostService(hostField);
        if (wf != null) {
            wfi = new WebForwardItem(wf, aditoHost, PolicyDatabaseFactory.getInstance().getPoliciesAttachedToResource(wf,
                sessionInfo.getUser().getRealm()), wf.sessionPasswordRequired(sessionInfo));
            return new WrappedFavoriteItem(wfi, type);
        }
        return null;
    }
View Full Code Here

                            + "&adito=' + escape(window.location.protocol + '//' + "
                            + "window.location.host + ':' + window.location.port)," + "'_blank'," +
                            "'" + (windowParsed == null ? "" : windowParsed) + "');myRef.focus();";
        } else {
         
          SessionInfo session = launchSession.getSession();
          StringBuffer tunnels = new StringBuffer();
         
          if (DefaultAgentManager.getInstance().hasActiveAgent(session)) {
          try {
            Request agentRequest = ((ApplicationService) DefaultAgentManager.getInstance().getService(ApplicationService.class)).launchApplication(launchSession);
View Full Code Here

TOP

Related Classes of com.adito.security.SessionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.