Glassfish @RolesAllowed with custom SecurityContext
问题 The question i'm about to ask is a bit tricky and I haven't found any answer yet. Maybe because i'm looking for the wrong thing. But i hope you will help me on this. I used the following tutorial to implement a custom SecurityContext that uses tokens instead of basic user/password authentication. Basically it initializes and injects a ResourceFilterFactory that will itself inject a ResourceFilter at every HTTP request sent to the application. This ResourceFilter searches for the