示例:
在shiro.ini中我有:
# Change from FormAuthenticationFilter to VerboseFormAuthenticationFilter
authc=webapp.filters.VerboseFormAuthenticationFilter
authc.loginUrl=/login
authc.successUrl=/oncall
如何使用Shiro Guice执行上述操作?我对以下内容感兴趣:
authc=webapp.filters.VerboseFormAuthenticationFilter
答案 0 :(得分:0)
public class YourShiroSecurityModule extends ShiroWebModule {
private static final Key<VerboseFormAuthenticationFilter> VERBOSE_AUTH = Key.get(VerboseFormAuthenticationFilter.class);
public YourShiroSecurityModule(ServletContext servletContext) {
super(servletContext);
}
@Override
protected void configureShiroWeb() {
[...]
addFilterChain("<path>", VERBOSE_AUTH);
}
}