Module: Sinatra::DataMapperAuth::Helpers
- Defined in:
- lib/sinatra/datamapperauth.rb
Instance Method Summary collapse
Instance Method Details
#authorize! ⇒ Object
49 50 51 |
# File 'lib/sinatra/datamapperauth.rb', line 49 def redirect '/login' unless end |
#authorized? ⇒ Boolean
46 47 48 |
# File 'lib/sinatra/datamapperauth.rb', line 46 def return true if session[:user] end |
#logout! ⇒ Object
52 53 54 |
# File 'lib/sinatra/datamapperauth.rb', line 52 def logout! session[:user] = false end |