We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Sinatra needs to set Rack::Session::Cookie before Rack::CAS:
Rack::Session::Cookie
Rack::CAS
# config.ru require 'rack/cas' use Rack::Session::Cookie, secret: 'verystrongsecret' use Rack::CAS, server_url: 'https://cas.example.com' require './my_app' run MyApp
For more Options on Rack::Session::Cookie see Rack::Session::Cookie
# my_app require 'sinatra' class MyApp < Sinatra::Base before do halt 401 unless request.session['cas'] and request.session['cas']['user'] end get "/" do request.session['cas'].inspect end end