使用 devise 和 rails 进行 JWT 令牌验证
devise-jwt 是一个 Devise 扩展,它使用 JWT 令牌进行用户身份验证。它遵循 默认安全 原则。devise-jwt 只是在 warden-jwt_auth 上的一层薄膜,它配置了可以立即与 Devise 和 Rails 一起使用。自 v0.7.0 版本起,Blacklist 取消列表策略已更名为 Denylist,而Whitelist 则更名为 Allowlist。
对于 Denylist, 您只需要更新在撤销策略模型中使用的 include 行:
# include Devise::JWT::RevocationStrategies::Blacklist # before
include Devise::JWT::RevocationStrategies::Denylist对于 Allowlist,您需要更新用户模型中使用的 include 行:
暂无开放 Issues,或尚未同步最近议题。