local-openid.git  about / heads / tags
Single User, Ephemeral OpenID Provider
blob 4b8f315bf7e1b6584df6453f209e571dda8ab83d 510 bytes (raw)
$ git show HEAD:bin/local-openid	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
#!/usr/bin/env ruby
require 'local_openid'
require 'optparse'
require 'socket'
BasicSocket.do_not_reverse_lookup = true
opts = {
  :server => 'webrick', # webrick is standard, and plenty fast enough
}
OptionParser.new { |op|
  op.on('-s <mongrel|thin|webrick>') { |v| opts[:server] = v }
  op.on('-p port')   { |val| opts[:port] = val.to_i }
  op.on('-o addr')   { |val| opts[:bind] = val }
  op.on('-h', '--help', 'Show this message') do
    puts op.to_s
    exit
  end
}.parse!(ARGV)

LocalOpenID.run!(opts)

git clone https://yhbt.net/local-openid.git