Module: Authstrategies::Helpers
- Defined in:
- lib/authstrategies/helpers.rb
Instance Method Summary collapse
- #authenticate!(strategy = :password) ⇒ Object
- #authenticated? ⇒ Boolean
- #current_user ⇒ Object
- #login_path ⇒ Object
- #logout ⇒ Object
- #logout_path ⇒ Object
- #signup_path ⇒ Object
Instance Method Details
#authenticate!(strategy = :password) ⇒ Object
3 4 5 |
# File 'lib/authstrategies/helpers.rb', line 3 def authenticate! strategy = :password env['warden'].authenticate! strategy end |
#authenticated? ⇒ Boolean
7 8 9 |
# File 'lib/authstrategies/helpers.rb', line 7 def authenticated? env['warden'].authenticated? end |
#current_user ⇒ Object
11 12 13 |
# File 'lib/authstrategies/helpers.rb', line 11 def current_user env['warden'].user end |
#login_path ⇒ Object
19 20 21 |
# File 'lib/authstrategies/helpers.rb', line 19 def login_path '/login' end |
#logout ⇒ Object
15 16 17 |
# File 'lib/authstrategies/helpers.rb', line 15 def logout env['warden'].logout end |
#logout_path ⇒ Object
23 24 25 |
# File 'lib/authstrategies/helpers.rb', line 23 def logout_path '/logout' end |
#signup_path ⇒ Object
27 28 29 |
# File 'lib/authstrategies/helpers.rb', line 27 def signup_path '/signup' end |