Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions admin/mkassoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/usr/bin/env ruby

require "openid/consumer/associationmanager"
require "openid/store/memstore"
require "openid/store/memory"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


store = OpenID::MemoryStore.new
store = OpenID::Store::Memory.new
ARGV.each do |server_url|
mgr = OpenID::Consumer::AssociationManager.new(store, URI.parse(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
Expand Down