Package com.gitblit.Constants

Examples of com.gitblit.Constants.AuthenticationType


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

    // Login the user
    if (user != null) {
      // 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);
View Full Code Here


   */
  @Override
  public void setCookie(HttpServletRequest request, HttpServletResponse response, UserModel user) {
    if (settings.getBoolean(Keys.web.allowCookieAuthentication, true)) {
      HttpSession session = request.getSession();
      AuthenticationType authenticationType = (AuthenticationType) session.getAttribute(Constants.AUTHENTICATION_TYPE);
      boolean standardLogin = authenticationType.isStandard();

      if (standardLogin) {
        Cookie userCookie;
        if (user == null) {
          // clear cookie for logout
View Full Code Here

      GitBlitWebSession session = GitBlitWebSession.get();
      UserModel user = session.getUser();
      boolean editCredentials = app().authentication().supportsCredentialChanges(user);
      HttpServletRequest request = ((WebRequest) getRequest()).getHttpServletRequest();
      AuthenticationType authenticationType = (AuthenticationType) request.getSession().getAttribute(Constants.AUTHENTICATION_TYPE);
      boolean standardLogin = authenticationType.isStandard();

      if (app().settings().getBoolean(Keys.web.allowGravatar, true)) {
        add(new GravatarImage("username", user, "navbarGravatar", 20, false));
      } else {
        add(new Label("username", user.getDisplayName()));
View Full Code Here

TOP

Related Classes of com.gitblit.Constants.AuthenticationType

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.