Hi Andrew,

Absolutely.

The ShiroFilter in web.xml delegates to a FilterChainResolver at
runtime to figure out what (if any) pre-configured filter chain should
execute for that request.  The PathMatchingFilterChainResolver
implementation in turn consults the FilterChainManager to acquire the
chain based on a matching request path.

You can interact with the FilterChainManager instance at runtime to
modify chains as you see fit
(pathMatchingFilterChainResolver.getFilterChainManager()).  See the
FilterChainManager addFilter and getChain methods - you can likely do
what you need from them.  The JavaDoc for the remaining methods should
help describe what's left.

HTH,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282

On Thu, Apr 18, 2013 at 8:33 AM, cantgetnosleep
<[email protected]> wrote:
> I'm using Shiro in a web application/servlet and I have it setup as described
> in the documentation using the EnvironmentLoaderListener and the ShiroFilter
> (in my web.xml).
>
> Is there any way to modify or define filters dynamically at runtime?
>
> Thanks,
>
> Andrew
>
>
>
> --
> View this message in context: 
> http://shiro-user.582556.n2.nabble.com/Define-filters-at-runtime-tp7578618.html
> Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to