Sha256: 668aeccee27040733891f5119c50f4ea9cd629f8aaf50e726dfb948e4dd55f3a

Contents?: true

Size: 612 Bytes

Versions: 2

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true

module SimpleAuth
  class Config
    # Set which scopes will be activated.
    # By default it enables `user` and `admin`.
    attr_accessor :scopes

    # Set the login url.
    # This will be used to redirect unlogged users to the login page.
    # Default to `login_path`.
    attr_accessor :login_url

    # Set the logged url.
    # This will be used to redirect logged users to the dashboard page.
    # Default to `dashboard_path`.
    attr_accessor :logged_url

    def install_helpers!
      ::ActionController::Base.include SimpleAuth::ActionController
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_auth-3.1.1 lib/simple_auth/config.rb
simple_auth-3.1.0 lib/simple_auth/config.rb