users@jersey.java.net

[Jersey] Fwd: Webservice Filter

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Wed, 6 Mar 2013 11:20:18 +0100

Forwarding to users mailing list.

Marek

Begin forwarded message:

> From: <damien.gallagher_at_gmail.com>
> Subject: Webservice Filter
> Date: March 4, 2013 9:01:21 PM GMT+01:00
> To: dev_at_jersey.java.net
> Reply-To: dev_at_jersey.java.net
>
> Hi
>
> I am designing a set of webservices where the user needs an api key to
> use the service.
> I dont want to replicate the check on all services to see if the user
> has a valid api key
>
>
> Basically on every request I want to check if the api key is valid, if
> not then I return a generic error response, if it is valid then process
> the request
>
> I had a look at the class
> com.sun.jersey.api.container.filter.LoggingFilter and could do
> something similar to this but interested in hearing peoples thoughts
>
> I was wondering what approach people would use to perform this task?
>
> Thanks
> Damien