File: mkassoc

package info (click to toggle)
ruby-openid 2.9.2debian-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,252 kB
  • sloc: ruby: 17,952; xml: 219; sh: 78; python: 30; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env ruby

require "openid/consumer/associationmanager"
require "openid/store/memory"

store = OpenID::Store::Memory.new
ARGV.each do |server_url|
  unless URI::regexp =~ server_url
    puts "`#{server_url}` will be skipped for invalid URI format."
    next
  end

  mgr = OpenID::Consumer::AssociationManager.new(store, server_url)
  puts '=' * 50
  puts "Server: #{server_url}"
  puts mgr.get_association.serialize
  puts '-' * 50
end