Module: Devise::JWT::WardenHelper

Defined in:
lib/devise/jwt/extensions/warden_helper.rb

Class Method Summary collapse

Class Method Details

.add_mappings(*models) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/devise/jwt/extensions/warden_helper.rb', line 5

def add_mappings(*models)
  Warden::JWTAuth.configure do |config|
    config.mappings = {}
    config.revocation_strategies ||= {}
    models.each do |model|
      map_model(model)
    end
    config.mappings = mappings
    config.revocation_strategies = revocations
  end
end