Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization format #1

Closed
sunwu51 opened this issue Nov 10, 2017 · 3 comments
Closed

Authorization format #1

sunwu51 opened this issue Nov 10, 2017 · 3 comments

Comments

@sunwu51
Copy link

sunwu51 commented Nov 10, 2017

Authorization的格式,对于JWT标准写法应该是Bearer格式吧,而我发现代码中确要求传username。
test
其他问题:
这个jwt的依赖是否能设置token的超时时间?

能否增加注解@hasRole的支持

@Smith-Cruise
Copy link
Owner

第一个问题:官方规范的话是使用Bearer格式,不过我之所以是要使用username是因为我要通过username来校验用户的token是否合法,这个你可以看看我的逻辑处理。其实这一块不一定要按照规范来的嘛,只要你能保证最后鉴权能成功,没有权限漏洞即可。

第二个问题:JWT的token超时时间是支持的,你看看JWT的文档吧。

第三个问题:我刚刚发现shiro官方有shiro-spring-boot-web-starter的整合包,有时间我会重新写下教程,到时候也能很方便的实现注解等功能。顺便那个token鉴权方式我也会重新改写的,写好了会告诉你的。

@sunwu51
Copy link
Author

sunwu51 commented Nov 10, 2017

好的谢谢

@sunwu51 sunwu51 closed this as completed Nov 10, 2017
@Smith-Cruise
Copy link
Owner

教程更新了,你可以看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants