可以登录成功,session 里面有值,但是想要访问其他的路径,都会被拦截到 nutzbook/user/login 方法中,是不是shiro 配置出了问题啊,我是copy book 上面的
@wendal 2016-11-14 16:56:22,422 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'captchaModule'<class net.wendal.nutzbook.module.CaptchaModule>
2016-11-14 16:56:22,461 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:27) DEBUG - [ GET]URI=/nutzbook/captcha/next 39ms
2016-11-14 16:56:27,860 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/user/login : UserModule.loginPage(UserModule.java:181)
2016-11-14 16:56:27,861 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'userModule'<class net.wendal.nutzbook.module.UserModule>
2016-11-14 16:56:27,864 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:27) DEBUG - [ GET]URI=/nutzbook/user/login 3ms
2016-11-14 16:56:27,915 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/captcha/next : CaptchaModule.next(CaptchaModule.java:25)
2016-11-14 16:56:27,916 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'captchaModule'<class net.wendal.nutzbook.module.CaptchaModule>
2016-11-14 16:56:27,937 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:27) DEBUG - [ GET]URI=/nutzbook/captcha/next 21ms
2016-11-14 16:56:28,665 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/user/login : UserModule.loginPage(UserModule.java:181)
2016-11-14 16:56:28,665 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'userModule'<class net.wendal.nutzbook.module.UserModule>
2016-11-14 16:56:28,666 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:27) DEBUG - [ GET]URI=/nutzbook/user/login 1ms
2016-11-14 16:56:28,737 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/captcha/next : CaptchaModule.next(CaptchaModule.java:25)
2016-11-14 16:56:28,737 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'captchaModule'<class net.wendal.nutzbook.module.CaptchaModule>
2016-11-14 16:56:28,759 net.wendal.nutzbook.mvc.LogTimeProcessor.process(LogTimeProcessor.java:27) DEBUG - [ GET]URI=/nutzbook/captcha/next 22ms
我访问的流程是,nutzbook/user/logout -->拦截到 nutzbook/user/login ,进入到登录页面,登录成功后 访问 nutzbook/user -->但是又被拦截到 nutzbook/user/login ,整个流程就是这样的,兽总看下
@wendal 兽总,按照您说的 把 shiro.ini 中 /user/** = authc 去掉,现在可以访问了,去掉之后的意思 是不是 不用拦截到 shiro 去验证了啊,能不能稍微给指点一下
@wendal 现在我就是按照nutzbook 上一步一步来的,登录需要 name + password(采用 user.setSalt(R.UU16());
user.setPassword(new Sha256Hash(password, user.getSalt()).toHex());
) 加密,还有nutz 中的简单二维码 来进行验证
@wendal 好的,谢谢兽总