shiro.ini
shiroDbRealm = cn.wizzer.common.shiro.realm.NutDaoRealm
shiroDbRealm.credentialsMatcher = $sha256Matcher
authc = cn.wizzer.common.shiro.filter.SimpleAuthenticationFilter
authc.loginUrl = /platform/login
logout.redirectUrl = /platform/login
[urls]
/platform/doLogin = anon
/assets/** = anon
/** = anon
/platform/** = authc
动态链
var chain={
"default" : {
"ps" : [
"cn.wizzer.common.processor.LogTimeProcessor",
"cn.wizzer.common.processor.GlobalsSettingProcessor",
"org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor",
"org.nutz.mvc.impl.processor.EncodingProcessor",
"org.nutz.mvc.impl.processor.ModuleProcessor",
"cn.wizzer.common.processor.NutShiroProcessor",
"cn.wizzer.common.processor.XssSqlFilterProcessor",
"org.nutz.mvc.impl.processor.ActionFiltersProcessor",
"org.nutz.mvc.impl.processor.AdaptorProcessor",
"org.nutz.mvc.impl.processor.MethodInvokeProcessor",
"org.nutz.mvc.impl.processor.ViewProcessor"
],
"error" : 'org.nutz.mvc.impl.processor.FailProcessor'
}
};
系统登录
@At("/doLogin")
@Ok("json")
@Filters(@By(type = AuthenticationFilter.class))
public Object doLogin(@Attr("loginToken") AuthenticationToken token, HttpServletRequest req, HttpSession session) {
int errCount = 0;
}
以上配置,请求逻辑从 [urls]开始,/platform/路径的请求,除了 dologin,不做拦截之外,其他都通过SimpleAuthenticationFilter拦截,并通过,shiroDbRealm处理权限相关,动态连中的 cn.wizzer.common.processor.NutShiroProcessor,怎么和 SimpleAuthenticationFilter 并联起来?系统登录 AuthenticationFilter,这个filter,跟NutShiroProcessor,怎么对应?
再有一套权限体系,shiro.ini,需要怎么配置,怎么通过,自定义processor处理?