shiro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Berry <>
Subject Re: Basic question on Shiro with Guice.
Date Sun, 20 Oct 2013 01:15:53 GMT
On Sat, Oct 19, 2013 at 7:23 PM, Jared Bunting

> I didn’t even think about request scoped things. But yeah, it should be
> fine. Something like:
> @Provides @RequestScoped
> Subject provideSubject() {
>    return SecurityUtils.getSubject();
> }
> I suppose my main question is essentially if anything like this is on the
road map for the ShiroWebModule?  Seems it would be a fairly common thing
to allow the Subject or something similar to be injected.  (Granted, this
is such a tiny amount of code, I can't imagine it would be tough to adapt
to however this is done...)

> As far as the filter - I'm really not sure.

I guess my question really comes down to what necessitated the
OncePerRequest design?  If this is, as I suspect, to not have to have
multiple filter chains, would you be upset if I basically used the same
pattern in a code suggestion to the Guice-Persist group?

And again, thanks!


View raw message