【发布时间】:2016-01-06 13:22:40
【问题描述】:
我不确定我是否完全理解正确的 JWT 身份验证必须如何工作的概念。我发现了一篇关于 JWT Authentication 的文章,作者在其中谈到:
..the token is self-contained, so the client just need to resend to the server for each request, and the server just have to check the signature to ensure its validity. No more useless call to database or LDAP.
我有点担心短语-不再对数据库或 LDAP 进行无用的调用
但是如何检查例如User 是否仍然存在于系统中或User 未被禁止且此令牌已提前过期?
看起来我肯定需要调用数据库或 LDAP 以获取此信息并将其与 JWT 令牌内的信息进行比较。不是吗?
【问题讨论】:
标签: authentication architecture jwt