The {@link SecurityContext} is utilized, using the{@link SecurityContext#isUserInRole(java.lang.String) } method,to ascertain if the user is in one of the roles declared in by a {@link RolesAllowed}. If a user is in none of the declared roles then a 403 (Forbidden) response is returned.
If the {@link DenyAll} annotation is declared then a 403 (Forbidden) responseis returned.
If the {@link PermitAll} annotation is declared and is not overridden thenthis filter will not be applied.
When an application is deployed as a Servlet or Filter this Jersey resource filter can be registered using the following initialization parameter:
@author Paul.Sandoz@Sun.Com @see com.sun.jersey.api.container.filter<init-param> <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name> <param-value>com.sun.jersey.api.container.filter.RolesAllowedResourceFilterFactory</param-value> </init-param>
|
|