Package org.jrest4guice.security

Examples of org.jrest4guice.security.Role


  @Path("roles/{userName}")
  public List<Role> listUserRoles(String userName) {
    List<org.jrest4guice.sample.contact.entity.Role> userRoles = this.domain
        .getUserRoles(userName);
    List<Role> roles = new ArrayList<Role>(userRoles.size());
    Role role;
    for (org.jrest4guice.sample.contact.entity.Role _role : userRoles) {
      role = new Role();
      role.setId(_role.getId());
      role.setName(_role.getName());
      roles.add(role);
    }
    return roles;
  }
View Full Code Here


      } catch (Exception e) {
//         e.printStackTrace();
      }
      // ==================================================================

      Role guest = new Role();
      guest.setName("guest");
      subject.getPrincipals().add(guest);

      this.clearUserNameAndPassword();
      commitSucceeded = true;
      return true;
View Full Code Here

TOP

Related Classes of org.jrest4guice.security.Role

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.