Module: Cyclid::UI::AuthHelpers

Defined in:
app/cyclid_ui/helpers.rb

Overview

Sinatra Warden AuthN/AuthZ helpers

Instance Method Summary collapse

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_userObject

Current User object from the session



77
78
79
# File 'app/cyclid_ui/helpers.rb', line 77

def current_user
  warden.user
end

#wardenObject

Return the current Warden scope



67
68
69
# File 'app/cyclid_ui/helpers.rb', line 67

def warden
  env['warden']
end