Module: Cyclid::UI::AuthHelpers
- Defined in:
- app/cyclid_ui/helpers.rb
Overview
Sinatra Warden AuthN/AuthZ helpers
Instance Method Summary collapse
-
#authenticate! ⇒ Object
Call the Warden authenticate! method.
-
#current_user ⇒ Object
Current User object from the session.
-
#warden ⇒ Object
Return the current Warden scope.
Instance Method Details
#authenticate! ⇒ Object
Call the Warden authenticate! method
72 73 74 |
# File 'app/cyclid_ui/helpers.rb', line 72 def authenticate! warden.authenticate! end |
#current_user ⇒ Object
Current User object from the session
77 78 79 |
# File 'app/cyclid_ui/helpers.rb', line 77 def current_user warden.user end |
#warden ⇒ Object
Return the current Warden scope
67 68 69 |
# File 'app/cyclid_ui/helpers.rb', line 67 def warden env['warden'] end |