Sha256: df1b0c5ee6ced75a18b103238495c39c8d145981f31aea9ee870deea5d4bcdd3
Contents?: true
Size: 634 Bytes
Versions: 1
Compression:
Stored size: 634 Bytes
Contents
class Acme::Resources::Authorization HTTP01 = Acme::Resources::Challenges::HTTP01 attr_reader :domain, :status, :http01 def initialize(client, response) @client = client assign_challenges(response.body['challenges']) assign_attributes(response.body) end private def assign_challenges(challenges) challenges.each do |attributes| case attributes.fetch('type') when 'http-01' then @http01 = HTTP01.new(@client, attributes) else # no supported end end end def assign_attributes(body) @domain = body['identifier']['value'] @status = body['status'] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acme-client-0.1.3 | lib/acme/resources/authorization.rb |