Class: Acme::Client::Resources::Challenges::DNS01

Inherits:
Base
  • Object
show all
Defined in:
lib/acme/client/resources/challenges/dns01.rb

Constant Summary collapse

CHALLENGE_TYPE =
'dns-01'.freeze
RECORD_NAME =
'_acme-challenge'.freeze
RECORD_TYPE =
'TXT'.freeze
DIGEST =
OpenSSL::Digest::SHA256

Instance Attribute Summary

Attributes inherited from Base

#error, #status, #token, #url

Instance Method Summary collapse

Methods inherited from Base

#challenge_type, #initialize, #key_authorization, #reload, #request_validation, #to_h

Constructor Details

This class inherits a constructor from Acme::Client::Resources::Challenges::Base

Instance Method Details

#record_contentObject



17
18
19
# File 'lib/acme/client/resources/challenges/dns01.rb', line 17

def record_content
  Acme::Client::Util.urlsafe_base64(DIGEST.digest(key_authorization))
end

#record_nameObject



9
10
11
# File 'lib/acme/client/resources/challenges/dns01.rb', line 9

def record_name
  RECORD_NAME
end

#record_typeObject



13
14
15
# File 'lib/acme/client/resources/challenges/dns01.rb', line 13

def record_type
  RECORD_TYPE
end