Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: a05d914148
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (16 sloc) 0.282 kB
require 'sinatra'
enable :sessions
get '/' do
erb :index
end
post '/login' do
session[:authenticated] = true
redirect '/'
end
post '/logout' do
session[:authenticated] = false
redirect '/'
end
get '/auth_token' do
session[:authenticated] ? MAGIC_WORD : 'FAIL'
end
Jump to Line
Something went wrong with that request. Please try again.