Class: SimpleAuth::Config
- Inherits:
-
Object
- Object
- SimpleAuth::Config
- Defined in:
- lib/simple_auth/config.rb
Instance Attribute Summary collapse
-
#flash_message_key ⇒ Object
Set the flash message key.
-
#logged_url ⇒ Object
Set the logged url.
-
#login_url ⇒ Object
Set the login url.
-
#scopes ⇒ Object
Set which scopes will be activated.
Instance Method Summary collapse
Instance Attribute Details
#flash_message_key ⇒ Object
Set the flash message key. This will be used when setting messages for unlogged/unauthorized users.
21 22 23 |
# File 'lib/simple_auth/config.rb', line 21 def @flash_message_key end |
#logged_url ⇒ Object
Set the logged url. This will be used to redirect logged users to the dashboard page. Default to dashboard_path.
17 18 19 |
# File 'lib/simple_auth/config.rb', line 17 def logged_url @logged_url end |
#login_url ⇒ Object
Set the login url. This will be used to redirect unlogged users to the login page. Default to login_path.
12 13 14 |
# File 'lib/simple_auth/config.rb', line 12 def login_url @login_url end |
#scopes ⇒ Object
Set which scopes will be activated. By default it enables user and admin.
7 8 9 |
# File 'lib/simple_auth/config.rb', line 7 def scopes @scopes end |
Instance Method Details
#install_helpers! ⇒ Object
23 24 25 |
# File 'lib/simple_auth/config.rb', line 23 def install_helpers! ::ActionController::Base.include SimpleAuth::ActionController end |