Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Created September 22, 2009 18:44
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/191311 to your computer and use it in GitHub Desktop.
Save baroquebobcat/191311 to your computer and use it in GitHub Desktop.
require 'openid_provider_sinatra'
IDENTITY = OpenStruct.new :login=>'Alice',:password=>'secret',:url=>"http://id.example.com/#{login}"
use Rack::Auth::Basic do |username,password|
IDENTITY.password == password && IDENTITY.login == username
end
run OpenIDProvider.new do |provider|
provider.identity IDENTITY
provider.store OpenID::Store::Filesystem.new(Dir.pwd + '/../openid-store')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment