Package com.gitblit.wicket

Examples of com.gitblit.wicket.GitBlitWebSession.replaceSession()


    UserModel user = app().authentication().authenticate(httpRequest);

    // Login the user
    if (user != null) {
      // issue 62: fix session fixation vulnerability
      session.replaceSession();
      session.setUser(user);

      // Set Cookie
      WebResponse response = (WebResponse) getRequestCycle().getResponse();
      app().authentication().setCookie(response.getHttpServletResponse(), user);
View Full Code Here


  private void loginUser(UserModel user) {
    if (user != null) {
      // Set the user into the session
      GitBlitWebSession session = GitBlitWebSession.get();
      // issue 62: fix session fixation vulnerability
      session.replaceSession();
      session.setUser(user);

      // Set Cookie
      if (app().settings().getBoolean(Keys.web.allowCookieAuthentication, false)) {
        WebResponse response = (WebResponse) getRequestCycle().getResponse();
View Full Code Here

      // preserve the authentication type across session replacement
      AuthenticationType authenticationType = (AuthenticationType) request.getSession()
          .getAttribute(Constants.AUTHENTICATION_TYPE);

      // issue 62: fix session fixation vulnerability
      session.replaceSession();
      session.setUser(user);

      request.getSession().setAttribute(Constants.AUTHENTICATION_TYPE, authenticationType);

      // Set Cookie
View Full Code Here

      // Set the user into the session
      GitBlitWebSession session = GitBlitWebSession.get();

      // issue 62: fix session fixation vulnerability
      session.replaceSession();
      session.setUser(user);

      request = ((WebRequest) getRequest()).getHttpServletRequest();
      response = ((WebResponse) getResponse()).getHttpServletResponse();
      request.getSession().setAttribute(Constants.AUTHENTICATION_TYPE, AuthenticationType.CREDENTIALS);
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.