@Path(value="/protected") @RolesAllowed(value="BASIC_GUY") public final class ProtectedClassResource extends Object
RolesAllowed, PermitAll are supported on the class level.Method level annotations take precedence over the class level ones
| Constructor and Description |
|---|
ProtectedClassResource() |
| Modifier and Type | Method and Description |
|---|---|
String |
showAdminSecret(User user) |
String |
showBasicUserSecret(javax.ws.rs.core.SecurityContext context) |
String |
showSecret(User user) |
@GET @PermitAll @Path(value="guest") public String showSecret(User user)
@GET public String showBasicUserSecret(@Context javax.ws.rs.core.SecurityContext context)
@GET @RolesAllowed(value="ADMIN") @Path(value="admin") public String showAdminSecret(User user)
Copyright © 2011. All rights reserved.