Class: Webhookdb::Service::Auth

Inherits:
Object
  • Object
show all
Includes:
Appydays::Configurable
Defined in:
lib/webhookdb/service/auth.rb

Defined Under Namespace

Classes: Admin, AdminPasswordStrategy, FailureApp, Impersonation, PasswordStrategy, Skip

Class Method Summary collapse

Class Method Details

.add_warden_middleware(builder) ⇒ Object



104
105
106
107
108
109
110
111
112
# File 'lib/webhookdb/service/auth.rb', line 104

def self.add_warden_middleware(builder)
  builder.use Warden::Manager do |manager|
    # manager.default_strategies :password
    manager.failure_app = FailureApp

    manager.scope_defaults(:customer, strategies: [:password])
    manager.scope_defaults(:admin, strategies: [:admin_password])
  end
end