- All Implemented Interfaces:
- com.sun.jersey.spi.container.ResourceFilterFactory
public class AuthResourceFilterFactory
extends java.lang.Object
implements com.sun.jersey.spi.container.ResourceFilterFactory
ResourceFilterFactory that places filters on the request for authentication and authorization based
on the presence of RequiresAuthentication and RequiresPermissions annotations on the
resource class and/or methods.
Each annotation can substitute values from the path or query params into the permissions, as demonstrated in the
following examples:
\@Path ("resource/{id}")
\@RequiresPermissions("resource|get|{id}")
\@GET
public ClientResponse get(@PathParam("id") String id) {
...
}
\@Path ("resource/transfer")
\@RequiresPermissions({"resource|update|{?from}", "resource|update|{?to}"})
\@POST
public ClientResponse transfer(@QueryParam("from") String from, @QueryParam("to") to) {
...
}