Created
September 22, 2009 18:44
-
-
Save baroquebobcat/191311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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