I'm using a Grizzly HttpServer
which has two HttpHandler
instances registered:
- under
/api/*
there is an Jersey REST - style application offering the API of the product, and - under
/*
there is anStaticHttpHandler
which serves static HTML / JavaScript content (which, among other things, talks to the API under/api/
For authentication I'm currently securing only the API using a Jersey ContainerRequestFilter
implementing HTTP Basic Auth, which looks quite similar to what is presented in another SO question.
But as requirements changed, now I'd like to require authentication for all requests hitting the server. So I'd like to move the authentication one level up, from Jersey to Grizzly. Unfortunately, I'm completely lost figuring out where I can hook up a "request filter" (or whatever it is called) in Grizzly. Can someone point me to the relevant API to accomplish this?