@RolesAllowed({"ROLE_ADMIN"})
@GET
public User getObject(final @Context SecurityContext securityContext) {
User user = getUserFromSecurityContext(securityContext);
if(user == null) {
throw new UserNotFoundException();
}
return new User(user);
}
No comments:
Post a Comment