users@jersey.java.net

Re: [Jersey] Noobie question, sorry: pre-filtering requests

From: Jim Powers <jim_at_casapowers.com>
Date: Thu, 24 Jul 2008 11:06:38 -0400

OK, second time's a charm (Mobile GMail lost my last message - grrrr)

> You can write a Jersey-based filter using the latest 0.9 snapshot. See this
> email thread for writing Jersey filters:
>
> http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users+filter#query:list%3Anet.java.dev.jersey.users%20filter+page:1+mid:p7yxygz4wpakqno5+state:results

Will check it out, thanks.

> A similar type of filter could also be written for the client side API (for
> testing and other purposes).
>
> Would the filter you plan to write be a generic filter with no application
> dependencies? if so would you be open to contributing such a filter back to
> the Jersey project?

I would be glad to contribute it, it should not be hard to make it
application independent:

- Specify what headers/query parameters to include (by name or
pattern) in the check
- Specify header/query parameter containing the HMAC
- Specify a plug-in parameter collector
- Specify a plug-in HMAC validator
- Specify a plug-in secret key retriever

This can be done quite generically with some useful packaged defaults

-- 
Jim Powers