Package com.uphea.domain

Examples of com.uphea.domain.UserSession


    User user = userAuthManager.findUser(id, cookieData[1]);
    if (user == null) {
      return null;
    }
    userAuthManager.login(user);
    return new UserSession(user);
  }
View Full Code Here


    if (user == null) {
      return null;
    }
    // login
    userAuthManager.login(user);
    return new UserSession(user);
  }
View Full Code Here

  /**
   * Creates cookie data.
   */
  @Override
  protected String[] createCookieData(Object sessionObject) {
    UserSession userSession = (UserSession) sessionObject;
    User user = userSession.getUser();
    return new String[] {String.valueOf(user.getId()), user.getHashpw()};
  }
View Full Code Here

   * auth annotations on action methods, to use roles and so on.
   */
  @Override
  protected boolean authorize(ActionRequest request, Object sessionObject) {
    String actionPath = request.getActionPath();
    UserSession userSession = (UserSession) sessionObject;
    int userLevel = userSession == null ? 0 : userSession.getUser().getLevel().getValue();

    if (actionPath.startsWith("/user/")) {
      return userLevel >= UserLevel.USER.getValue();
    }

View Full Code Here

    user = userService.registerNewUser(user, newPassword);

    // send email
    emailBuilder.createWelcomeMessage(user);

    newUserSession = new UserSession(user);
    return CHAIN + "/j_register";
  }
View Full Code Here

TOP

Related Classes of com.uphea.domain.UserSession

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.