Permalink
Browse files

Update Sinatra example

  • Loading branch information...
1 parent 9aa4b7d commit d88d827812e70911b7e48564499882f55a3cc632 @josh josh committed Apr 24, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 examples/sinatra.rb
View
@@ -1,15 +1,15 @@
require 'rubygems'
require 'sinatra'
+# Session needs to be before Rack::OpenID
+use Rack::Session::Cookie
+
# gem 'rack-openid'
$: << File.dirname(__FILE__) + "/../lib"
require 'rack/openid'
use Rack::OpenID
-# Session needs to be after Rack::OpenID
-use Rack::Session::Cookie
-
get '/login' do
erb :login
end
@@ -22,7 +22,7 @@
"Error: #{resp.status}"
end
else
- header 'WWW-Authenticate' => Rack::OpenID.build_header(
+ headers 'WWW-Authenticate' => Rack::OpenID.build_header(
:identifier => params["openid_identifier"]
)
throw :halt, [401, 'got openid?']

0 comments on commit d88d827

Please sign in to comment.