我的用户。rb模型包含:
class User < ApplicationRecord
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable,
:confirmable, :lockable, :timeoutable, :omniauthable,
:jwt_authenticatable, jwt_revocation_strategy: JWTBlacklist
def send_devise_notification(notification, *args)
devise_mailer.send(notification, self, *args).deliver_later
end
end
我正在使用Desive jwt gem登录我的rails api。
我的JWT黑名单。rb模型包含:
class JwtBlacklist < ApplicationRecord
include Devise::JWT::RevocationStrategies::Blacklist
self.table_name = 'jwt_blacklist'
end