Module: Roda::RodaPlugins::Kabk
- Defined in:
- lib/roda/plugins/kabk.rb
Overview
Kabk plugin for Roda
Defined Under Namespace
Modules: RequestMethods
Class Method Summary collapse
Class Method Details
.configure(app, opts = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/roda/plugins/kabk.rb', line 14 def self.configure(app, opts = {}) app.opts[:kabk] ||= {} app.opts[:kabk][:mount_at] = opts[:mount_at] || "/api/admin" app.opts[:kabk][:system_config] = opts[:system_config] || nil app.opts[:kabk][:auth_strategy] = opts[:auth_strategy] # E.g., Kabk::Auth::JwtStrategy.new(secret: '...', default_exp: 86400) app.opts[:kabk][:login_handler] = opts[:login_handler] app.opts[:kabk][:change_password_handler] = opts[:change_password_handler] app.opts[:kabk][:upload_handler] = opts[:upload_handler] app.opts[:kabk][:serve_ui] = opts.key?(:serve_ui) ? opts[:serve_ui] : true end |
.load_dependencies(app, opts = {}) ⇒ Object
10 11 12 |
# File 'lib/roda/plugins/kabk.rb', line 10 def self.load_dependencies(app, opts = {}) app.plugin :all_verbs end |