summaryrefslogtreecommitdiffstats
path: root/vendor/gems/ruby-openid-2.1.4/examples/discover
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-02-12 21:25:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-02-12 21:25:50 +0000
commitff9da0bab038ea118b839dd2d9e93a4d1a37e274 (patch)
tree291390f695c5abbbe5c2dad973e312923830694d /vendor/gems/ruby-openid-2.1.4/examples/discover
parent5bdd4291624cabee530e1c40be79c19ba6fb09dd (diff)
downloadredmine-ff9da0bab038ea118b839dd2d9e93a4d1a37e274.tar.gz
redmine-ff9da0bab038ea118b839dd2d9e93a4d1a37e274.zip
Removes the fat ruby-openid gem. Simply use 'gem install ruby-openid' to enable openid support.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2458 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor/gems/ruby-openid-2.1.4/examples/discover')
-rw-r--r--vendor/gems/ruby-openid-2.1.4/examples/discover49
1 files changed, 0 insertions, 49 deletions
diff --git a/vendor/gems/ruby-openid-2.1.4/examples/discover b/vendor/gems/ruby-openid-2.1.4/examples/discover
deleted file mode 100644
index ab985a496..000000000
--- a/vendor/gems/ruby-openid-2.1.4/examples/discover
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env ruby
-require "openid/consumer/discovery"
-require 'openid/fetchers'
-
-OpenID::fetcher_use_env_http_proxy
-
-$names = [[:server_url, "Server URL "],
- [:local_id, "Local ID "],
- [:canonical_id, "Canonical ID"],
- ]
-
-def show_services(user_input, normalized, services)
- puts " Claimed identifier: #{normalized}"
- if services.empty?
- puts " No OpenID services found"
- puts
- else
- puts " Discovered services:"
- n = 0
- services.each do |service|
- n += 1
- puts " #{n}."
- $names.each do |meth, name|
- val = service.send(meth)
- if val
- printf(" %s: %s\n", name, val)
- end
- end
- puts " Type URIs:"
- for type_uri in service.type_uris
- puts " * #{type_uri}"
- end
- puts
- end
- end
-end
-
-ARGV.each do |openid_identifier|
- puts "=" * 50
- puts "Running discovery on #{openid_identifier}"
- begin
- normalized_identifier, services = OpenID.discover(openid_identifier)
- rescue OpenID::DiscoveryFailure => why
- puts "Discovery failed: #{why.message}"
- puts
- else
- show_services(openid_identifier, normalized_identifier, services)
- end
-end