| name | age | message | |
|---|---|---|---|
| |
LICENSE | Fri Oct 02 15:18:55 -0700 2009 | |
| |
README.rdoc | Mon Nov 16 11:54:30 -0800 2009 | |
| |
Rakefile | Sun Nov 29 10:18:32 -0800 2009 | |
| |
examples/ | Sun Nov 29 10:15:36 -0800 2009 | |
| |
lib/ | Fri Feb 05 23:54:04 -0800 2010 | |
| |
rack-openid.gemspec | Sat Feb 06 06:19:20 -0800 2010 | |
| |
test/ | Sat Feb 06 06:18:39 -0800 2010 |
README.rdoc
Rack::OpenID
Provides a more HTTPish API around the ruby-openid library.
Usage
You trigger an OpenID request similar to HTTP authentication. From your app, return a "401 Unauthorized" and a "WWW-Authenticate" header with the identifier you would like to validate.
On competition, the OpenID response is automatically verified and assigned to env.
MyApp = lambda { |env|
if resp = env["rack.openid.response"]
case resp.status
when :success
...
when :failure
...
else
[401, {"WWW-Authenticate" => 'OpenID identifier="http://example.com/"'}, []]
end
}
use Rack::OpenID
run MyApp
