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
45 46 47 |
# File 'app/cyclid_ui/helpers.rb', line 45 def authenticate! warden.authenticate! end |
#current_user ⇒ Object
Current User object from the session
50 51 52 |
# File 'app/cyclid_ui/helpers.rb', line 50 def current_user warden.user end |
#warden ⇒ Object
Return the current Warden scope
40 41 42 |
# File 'app/cyclid_ui/helpers.rb', line 40 def warden env['warden'] end |