Oh sorry Chris - this is 1.2. You could replicate this 1.2 feature into a 1.1 subclass however. Is there any reason why you can't run 1.2? It is recommended to upgrade if you can.
Regards, Les On Tue, Feb 7, 2012 at 3:32 AM, Chris Richmond <[email protected]> wrote: > This is in 1.1.0? (not using 1.2.0) > > Chris > > > On 2/6/2012 12:28 PM, Les Hazlewood wrote: >> >> Hi Chris, >> >> You can set (programmatically): >> >> shiroFilter.setEnabled(false); and it will allow all requests through >> unfiltered. >> >> One way of implementing this support is to do the following: >> >> If you create a subclass of ShiroFilter you can override init() method >> to look for a servlet init param and react accordingly. >> >> For example: >> >> @Override >> public void init() throws Exception { >> String paramValue = getInitParam("enabled"); >> if (paramValue != null) { >> if ("false'.equalsIgnoreCase(paramValue)) { >> setEnabled(false); >> } >> } >> super.init(); >> } >> >> Then add an init param: >> >> <filter> >> <filter-name>ShiroFilter</filter-name> >> <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class> >> <init-param> >> <param-name>enabled</param-name> >> <param-value>false</param-value> >> </init-param> >> </filter> >> >> It's just an idea. However you choose to call the setEnabled method >> is up to you. >> >> HTH,
