Module: Devise::Models::KillbillAuthenticatable::ClassMethods

Defined in:
app/models/kaui/killbill_authenticatable.rb

Instance Method Summary collapse

Instance Method Details

#find_for_killbill_authentication(kb_username) ⇒ Object

Invoked by the KillbillAuthenticatable strategy to lookup the user before attempting authentication



33
34
35
36
37
38
39
# File 'app/models/kaui/killbill_authenticatable.rb', line 33

def find_for_killbill_authentication(kb_username)
  find_for_authentication(kb_username: kb_username) ||
    new(kb_username: kb_username)
rescue KillBillClient::API::Unauthorized => _e
  # Multi-Tenancy was enabled, but the tenant_id couldn't be retrieved because of bad credentials
  nil
end