Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Created September 17, 2009 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baroquebobcat/188358 to your computer and use it in GitHub Desktop.
Save baroquebobcat/188358 to your computer and use it in GitHub Desktop.
require 'openid_provider_sinatra'
use Rack::Auth::Basic do |username,password|
'secret' == password
end
run OpenIDProvider.new nil, :store=>OpenID::Store::Filesystem.new(Dir.pwd + '/openid-store'),
:user=>Proc.new {|env|
login=env['REMOTE_USER']
return nil unless login
OpenStruct.new :login=>login,:url=>"http://id.example.com/#{login}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment