Sha256: a647f0e4dc8681c7de03c4e3e859a9031b103c4731a2c93b435eeac7fc179346
Contents?: true
Size: 690 Bytes
Versions: 2
Compression:
Stored size: 690 Bytes
Contents
class Acme::Client::Resources::Challenges::Base attr_reader :client, :status, :uri, :token, :error def initialize(client, attributes) @client = client assign_attributes(attributes) end def verify_status response = @client.connection.get(@uri) assign_attributes(response.body) @error = response.body['error'] status end private def authorization_key "#{token}.#{crypto.thumbprint}" end def assign_attributes(attributes) @status = attributes.fetch('status', 'pending') @uri = attributes.fetch('uri') @token = attributes.fetch('token') end def crypto @crypto ||= Acme::Client::Crypto.new(@client.private_key) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acme-client-0.2.4 | lib/acme/client/resources/challenges/base.rb |
acme-client-0.2.3 | lib/acme/client/resources/challenges/base.rb |