Check out the RolesAllowedResourceFilterFactory that comes with the T-shirt to see how this should work. factory implements ResourceFilterFactory , and its only implementation method:
List<ResourceFilter> create(AbstractMethod am);
In this way, you can get the method that you accessed. You can pass the abstract method to your filter or create the correct filter in advance.
source share