users@jersey.java.net

Re: Security Interceptors

From: Stephan Schmidt <stephan.schmidt_at_gmail.com>
Date: Tue, 25 Mar 2008 13:01:44 +0100

Hello,

I've been using Jersey successfully with the Web Beans IoC and will try
Web Beans Interceptors around resources for security this week, should
work I guess.

Along the lines of

http://stephan.reposita.org/archives/2008/02/25/adding-web-beans-jsr-299-to-jersey-for-rest/

Any thoughts on security interceptors with Web Beans?

Best regards
-stephan

On Tue, Mar 25, 2008 at 11:51 AM, Lars Tackmann <ltackmann_at_gmail.com> wrote:

> On Sun, Mar 23, 2008 at 5:55 PM, Martin Grotzke
> <martin.grotzke_at_javakaffee.de> wrote:
> > Hi Lars,
> >
> > one thing I could think of is to implement your own component provider,
> > that checks if the class to instantiate has your @Interceptors
> > annotation or any method has e.g. your @Audit annotation. For these
> > classes you could return a proxied instance (e.g. using cglib), so that
> > you can intercept method invocations.
>
> Just out of curiosity if I do somthing such as:
>
> --
> @Path("{id}"/)
> public NestedResource getNestedResource(@PathParam("id") Long id) {
> NestedResource res = injector.getInstance(NestedResource.class);
> res.setId(id);
> res.setUriInfo(uriInfo); // similar with HTTPHeaders...
> return res;
> }
> --
>
> then the guice interceptors will come into play and let me intercept
> methods annotated with @Audit. Now if Guice then could actually create
> the resources that Jersey handles today then I suppose I have a
> solution. I can of cause mix this with the provider hack but that
> seams to be a ugly mix.
>
> any thoughts ?
>
> --
> Yours sincerely
>
> Lars Tackmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>


-- 
Stephan Schmidt :: stephan_at_reposita.org
Reposita Open Source - Monitor your software development
http://www.reposita.org
Blog at http://stephan.reposita.org - No signal. No noise.