Package org.apache.openmeetings.web.app

Examples of org.apache.openmeetings.web.app.WebSession


    ldapConfigFileName = domain.getConfigFileName() == null ? "" : domain.getConfigFileName();
    if (domain.getAddDomainToUserName()) {
      login = login + "@" + domain.getDomain();
    }
    OmAuthenticationStrategy strategy = getAuthenticationStrategy();
    WebSession ws = WebSession.get();
    if (ws.signIn(login, password, ldapConfigFileName)) {
       setResponsePage(Application.get().getHomePage());
      if (rememberMe) {
        strategy.save(login, password, ldapConfigFileName);
      } else {
        strategy.remove();
      }
    } else {
      strategy.remove();
      if (ws.getLoginError() != null) {
        ErrorValue eValue = getBean(ErrorDao.class).get(-1 * ws.getLoginError());
        if (eValue != null) {
          error(WebSession.getString(eValue.getFieldvalues_id()));
          target.add(feedback);
        }
      }
View Full Code Here


 
  private FlvRecording getRecording(Attributes attributes) {
    PageParameters params = attributes.getParameters();
    StringValue idStr = params.get("id");
    Long id = getLong(idStr);
    WebSession ws = WebSession.get();
    if (id != null && ws.isSignedIn()) {
      return getRecording(id);
    } else {
      ws.invalidate();
      if (ws.signIn(idStr.toString())) {
        return getRecording(getRecordingId());
      }
    }
    return null;
  }
View Full Code Here

    ldapConfigFileName = domain.getConfigFileName() == null ? "" : domain.getConfigFileName();
    if (domain.getAddDomainToUserName()) {
      login = login + "@" + domain.getDomain();
    }
    OmAuthenticationStrategy strategy = getAuthenticationStrategy();
    WebSession ws = WebSession.get();
    if (ws.signIn(login, password, ldapConfigFileName)) {
       setResponsePage(Application.get().getHomePage());
      if (rememberMe) {
        strategy.save(login, password, ldapConfigFileName);
      } else {
        strategy.remove();
      }
    } else {
      strategy.remove();
      if (ws.getLoginError() != null) {
        ErrorValue eValue = getBean(ErrorDao.class).get(-1 * ws.getLoginError());
        if (eValue != null) {
          error(WebSession.getString(eValue.getFieldvalues_id()));
          target.add(feedback);
        }
      }
View Full Code Here

 
  private FlvRecording getRecording(Attributes attributes) {
    PageParameters params = attributes.getParameters();
    StringValue idStr = params.get("id");
    Long id = getLong(idStr);
    WebSession ws = WebSession.get();
    if (id != null && ws.isSignedIn()) {
      return getRecording(id);
    } else {
      ws.invalidate();
      if (ws.signIn(idStr.toString())) {
        return getRecording(getRecordingId());
      }
    }
    return null;
  }
View Full Code Here

  protected void onSubmit(AjaxRequestTarget target) {
    if (domain.getAddDomainToUserName()) {
      login = login + "@" + domain.getDomain();
    }
    OmAuthenticationStrategy strategy = getAuthenticationStrategy();
    WebSession ws = WebSession.get();
    Type type = domain.getLdapConfigId() > 0 ? Type.ldap : Type.user;
    if (ws.signIn(login, password, type, domain.getLdapConfigId())) {
       setResponsePage(Application.get().getHomePage());
      if (rememberMe) {
        strategy.save(login, password, type, domain.getLdapConfigId());
      } else {
        strategy.remove();
      }
    } else {
      strategy.remove();
      if (ws.getLoginError() != null) {
        ErrorValue eValue = getBean(ErrorDao.class).get(-1 * ws.getLoginError());
        if (eValue != null) {
          error(WebSession.getString(eValue.getFieldvalues_id()));
          target.add(feedback);
        }
      }
View Full Code Here

     
      ServletWebRequest req = new ServletWebRequest(new MockHttpServletRequest(a, new MockHttpSession(a.getServletContext()), a.getServletContext()), "");
      RequestCycleContext rctx = new RequestCycleContext(req, new MockWebResponse(), a.getRootRequestMapper(), a.getExceptionMapperProvider().get());
      ThreadContext.setRequestCycle(new RequestCycle(rctx));
     
      WebSession s = WebSession.get();
      s.setLanguage(langId);
      ThreadContext.setSession(s);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.web.app.WebSession

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.