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

getCredentials() 还是 getPrincipal()的问题 #17

Closed
hequanb opened this issue Apr 16, 2019 · 1 comment
Closed

getCredentials() 还是 getPrincipal()的问题 #17

hequanb opened this issue Apr 16, 2019 · 1 comment

Comments

@hequanb
Copy link

hequanb commented Apr 16, 2019

您的代码中自定义的realm中,
在身份验证的方法, 为什么token是从getCredentials()中取呢? 不是应该从 getPrincipal()中取出吗?

源码中getCredentials()返回的应该是密码吧, 为什么要把token保存在密码中呢,
不是一般都是用用户ID去做Token的吗?

@hequanb
Copy link
Author

hequanb commented Apr 16, 2019

因为JwtToken类继承了AuthenticationToken并重写了这两个方法..

@hequanb hequanb closed this as completed Apr 16, 2019
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

1 participant