Package org.jrest4guice.security

Examples of org.jrest4guice.security.User


  @Path("auth")
  public boolean authUser(String userName, String userPassword) {
    boolean result = this.domain.authUser(userName, userPassword);
    if (result) {
      UserRole userRole = new UserRole();
      User user = new User();
      List<Role> roles = this.listUserRoles(userName);
      userRole.setUser(user);
      userRole.setRoles(roles);
     
      //缓存当前用户的权限信息
View Full Code Here


  public boolean commit() throws LoginException {
    if (!succeeded) {
      return false;
    } else {
      user = new User();
      user.setName(this.username);

      if (!subject.getPrincipals().contains(user)) {
        // 注册用户
        subject.getPrincipals().add(user);
View Full Code Here

TOP

Related Classes of org.jrest4guice.security.User

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.