Module: Katalyst::Basic::Auth
- Defined in:
- lib/katalyst/basic/auth.rb,
lib/katalyst/basic/auth/rails.rb,
lib/katalyst/basic/auth/config.rb,
lib/katalyst/basic/auth/middleware.rb
Defined Under Namespace
Classes: Config, Middleware, Railtie
Class Method Summary collapse
-
.add(path, username: nil, password: nil, ip_allowlist: nil) ⇒ Object
Add a path to be protected by basic authentication.
-
.exclude(path) ⇒ Object
Add a path to be excluded from basic authentication.
Class Method Details
.add(path, username: nil, password: nil, ip_allowlist: nil) ⇒ Object
Add a path to be protected by basic authentication
16 17 18 19 20 21 22 |
# File 'lib/katalyst/basic/auth.rb', line 16 def add(path, username: nil, password: nil, ip_allowlist: nil) Config.add(path: path, username: username, password: password, enabled: true, ip_allowlist: ip_allowlist) end |