Class RolesAllowedRequestFilter

  • All Implemented Interfaces:
    jakarta.ws.rs.container.ContainerRequestFilter

    @Priority(2000)
    public class RolesAllowedRequestFilter
    extends Object
    implements jakarta.ws.rs.container.ContainerRequestFilter
    This JAX-RS filter makes sure only callers with the given roles can access the resource method(s) to which this filter is applied.

    Note that if pre-emptive authentication is not active and the caller is found to be unauthenticated when reaching this filter, the installed authentication mechanism will be invoked.

    Author:
    Arjan Tijms
    • Method Detail

      • filter

        public void filter​(jakarta.ws.rs.container.ContainerRequestContext requestContext)
                    throws IOException
        Specified by:
        filter in interface jakarta.ws.rs.container.ContainerRequestFilter
        Throws:
        IOException