Module: Maquina::Authenticate
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApplicationController
- Defined in:
- app/controllers/concerns/maquina/authenticate.rb
Instance Method Summary collapse
- #after_authentication_url ⇒ Object
- #authenticated? ⇒ Boolean (also: #signed_in?)
- #current_user ⇒ Object
- #require_authentication ⇒ Object
Instance Method Details
#after_authentication_url ⇒ Object
27 28 29 |
# File 'app/controllers/concerns/maquina/authenticate.rb', line 27 def after_authentication_url session.delete(:return_to_after_authenticating) || root_url end |
#authenticated? ⇒ Boolean Also known as: signed_in?
18 19 20 |
# File 'app/controllers/concerns/maquina/authenticate.rb', line 18 def authenticated? Maquina::Current.signed_in? end |
#current_user ⇒ Object
23 24 25 |
# File 'app/controllers/concerns/maquina/authenticate.rb', line 23 def current_user Maquina::Current.user end |
#require_authentication ⇒ Object
31 32 33 |
# File 'app/controllers/concerns/maquina/authenticate.rb', line 31 def require_authentication load_session || request_authentication end |