Class: Acme::Client::Resources::Challenges::HTTP01

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

Constant Summary collapse

CHALLENGE_TYPE =
'http-01'.freeze
CONTENT_TYPE =
'text/plain'.freeze

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

#content_typeObject



7
8
9
# File 'lib/acme/client/resources/challenges/http01.rb', line 7

def content_type
  CONTENT_TYPE
end

#file_contentObject



11
12
13
# File 'lib/acme/client/resources/challenges/http01.rb', line 11

def file_content
  key_authorization
end

#filenameObject



15
16
17
# File 'lib/acme/client/resources/challenges/http01.rb', line 15

def filename
  ".well-known/acme-challenge/#{token}"
end