【发布时间】:2018-11-05 15:55:51
【问题描述】:
我的 user.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
我正在使用 devise-jwt gem 登录我的 rails api。
我的 JWTBlacklist.rb 模型包含:
class JwtBlacklist < ApplicationRecord
include Devise::JWT::RevocationStrategies::Blacklist
self.table_name = 'jwt_blacklist'
end
【问题讨论】:
标签: ruby-on-rails devise jwt