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



45
46
47
# File 'app/cyclid_ui/helpers.rb', line 45

def authenticate!
  warden.authenticate!
end

#current_userObject

Current User object from the session



50
51
52
# File 'app/cyclid_ui/helpers.rb', line 50

def current_user
  warden.user
end

#wardenObject

Return the current Warden scope



40
41
42
# File 'app/cyclid_ui/helpers.rb', line 40

def warden
  env['warden']
end