Module: Sinatra::SessionAuth::Helpers
- Defined in:
- lib/rbbt/workflow/rest/auth.rb
Instance Method Summary collapse
Instance Method Details
#authorize! ⇒ Object
15 16 17 |
# File 'lib/rbbt/workflow/rest/auth.rb', line 15 def redirect '/login' unless end |
#authorized? ⇒ Boolean
7 8 9 |
# File 'lib/rbbt/workflow/rest/auth.rb', line 7 def session[:authorized] end |
#logout! ⇒ Object
19 20 21 |
# File 'lib/rbbt/workflow/rest/auth.rb', line 19 def logout! session[:authorized] = false end |
#user ⇒ Object
11 12 13 |
# File 'lib/rbbt/workflow/rest/auth.rb', line 11 def user session[:user] end |