Is it possible to implement a JAX-RS @NamedBinding security Filter on a resource method when using an interface to describe the resource to JAX-RS? By way of example:
@path("/myrest")
public interface IFooResource {
@GET
public String getSomething();
}
public class FooResource implements IFooResource {
@Authenticated
public String getSomething() {
return "foo";
}
}
This functionally works fine in terms of REST, but if the @Authenticated annotation is attached to a JAX-RS security filter associated via @NameBinding, then that filter never fires. If, however, you move the @GET annotation out of the interface and down into the implementation class it works just fine (security filter fires)!
Should splitting these annotations between interface and implementation work? or is that illegal in terms of the JAX-RS spec?