dolyw/ShiroJwt

getCredentials() 还是 getPrincipal()的问题

hequanb opened this issue · 1 comments

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

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

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