Examples of LoginBean


Examples of br.com.triadworks.loja.controller.LoginBean

 
  @Before
  public void setup() {
    MockitoAnnotations.initMocks(this);
    usuarioWeb = new UsuarioWeb();
    controller = new LoginBean(usuarioWeb, usuarioService, facesUtils);
  }
View Full Code Here

Examples of com.din.din.webapp.beans.LoginBean

  }

  public static void addListener(LoginListener listener) {
    FacesContext context = FacesContext.getCurrentInstance();
    if(context != null) {
      LoginBean sessionLoginInfo = getSessionLoginInfo(context);
      if(sessionLoginInfo != null) {
        sessionLoginInfo.addListener(listener);
      }
    }
  }
View Full Code Here

Examples of com.din.din.webapp.beans.LoginBean

  public void beforePhase(PhaseEvent event) {
    FacesContext context;
    if (event.getPhaseId() == PhaseId.RESTORE_VIEW) {
      context = event.getFacesContext();
     
      LoginBean sessionLoginInfo = getSessionLoginInfo(context);
      if(sessionLoginInfo != null) {
        sessionLoginInfo.performCheck();
      }
    }
  }
View Full Code Here

Examples of com.din.din.webapp.beans.LoginBean

    ELContext elContext = context.getELContext();
    ValueExpression ve = application.getExpressionFactory()
        .createValueExpression(elContext,
            LoginBean.ACCESSOR, LoginBean.class);
   
    LoginBean sessionLoginInfo = (LoginBean)ve.getValue(elContext);
    return sessionLoginInfo;
  }
View Full Code Here

Examples of com.mierdasoft.bowlpoolmanager.model.beans.LoginBean

import com.mierdasoft.bowlpoolmanager.model.beans.PathBean;

public class ApplyTemplateCommand implements Command {
  @Override
  public void execute(CommandContext context) {
    LoginBean login;
    PathBean cssPath, jQueryPath, jQueryUIPath;
    ServletContext servletContext;
    String baseUrl, view;

    servletContext = context.getServletContext();

    baseUrl = servletContext.getInitParameter("site.url");

    if (!baseUrl.endsWith("/"))
      baseUrl = baseUrl + "/";

    cssPath = new PathBean(baseUrl
        + servletContext.getInitParameter("site.css"));

    jQueryPath = new PathBean(baseUrl
        + servletContext.getInitParameter("site.jquery"));

    jQueryUIPath = new PathBean(baseUrl
        + servletContext.getInitParameter("site.jquery-ui"));

    view = (String) context.getRequest().getAttribute("forwardToView");

    if (view == null)
      view = "WelcomePage";

    try {
      context.setScopedVariable("site.css", cssPath);
      context.setScopedVariable("site.jquery", jQueryPath);
      context.setScopedVariable("site.jquery-ui", jQueryUIPath);

      login = new LoginBean();
      login.setUser(UserServiceFactory.getUserService().getCurrentUser());
      login.setContinueUrl(context.getRequest().getRequestURL().toString());

      context.setScopedVariable("login", login);
      context.setScopedVariable("copyrightNotice", new CopyrightBean());

      context.forwardToView(view);
View Full Code Here

Examples of com.softwaremill.common.cdi.security.LoginBean

    }

    public void beforePhase(PhaseEvent event) {
        FacesContext ctx = event.getFacesContext();
        HttpSession session = ((HttpSession) ctx.getExternalContext().getSession(true));
        LoginBean login = BeanInject.lookup(LoginBean.class);
        Page page = nav.lookup(event.getFacesContext().getViewRoot().getViewId());

        if (page.isRequiresLogin() && !login.isLoggedIn()) {
            if (nav.shouldRedirectToLogin()) {
                redirectToLogin(ctx, session, nav, page);
            } else {
                nav.responseForbidden(ctx);
            }
        } else if (login.isLoggedIn() && session.getAttribute(PREVIOUS_VIEW) != null) {
            redirectToPreviousView(ctx, session);
        } else if (page.getSecurityEL() != null && page.getSecurityEL().length() > 0) {
            evaluateSecurityExpression(ctx, page);
        }
    }
View Full Code Here

Examples of de.archivator.beans.LoginBean

  /**
   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    proband = new LoginBean();
    facesContext = org.mockito.Mockito.mock(FacesContext.class);
    mockStatic(FacesContext.class);
    org.mockito.Mockito.when(FacesContext.getCurrentInstance()).thenReturn(facesContext);
  }
View Full Code Here

Examples of org.alfresco.web.bean.LoginBean

                        AuthenticationService auth = (AuthenticationService) ctx.getBean("AuthenticationService");
                        auth.validate(user.getTicket());

                        // save last username into portlet preferences, get from
                        // LoginBean state
                        LoginBean loginBean = (LoginBean) request.getPortletSession().getAttribute(AuthenticationHelper.LOGIN_BEAN);
                        if (loginBean != null) {
                            // TODO: Need to login to the Portal to get a user
                            // here to store prefs against
                            // so not really a suitable solution as they get
                            // thrown away at present!
                            // Also would need to store prefs PER user - so auto
                            // login for each...?
                            String oldValue = request.getPreferences().getValue(PREF_ALF_USERNAME, null);
                            if (oldValue == null || oldValue.equals(loginBean.getUsernameInternal()) == false) {
                                if (request.getPreferences().isReadOnly(PREF_ALF_USERNAME) == false) {
                                    request.getPreferences().setValue(PREF_ALF_USERNAME, loginBean.getUsernameInternal());
                                    request.getPreferences().store();
                                }
                            }
                        }
View Full Code Here

Examples of org.keycloak.login.freemarker.model.LoginBean

        if (client != null) {
            attributes.put("client", new ClientBean(client));
        }

        attributes.put("login", new LoginBean(formData));

        switch (page) {
            case LOGIN_CONFIG_TOTP:
                attributes.put("totp", new TotpBean(realm, user, baseUri));
                break;
View Full Code Here

Examples of org.openhab.io.cv.internal.resources.beans.LoginBean

      return Response.notAcceptable(null).build();
      }
    }

  private LoginBean getLoginBean(AtmosphereResource resource) {
    LoginBean bean = new LoginBean();
      bean.version = "0.0.1";
      bean.session = resource.uuid();
      return bean;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.