class AcmeNsupdate::Strategies::Http01
Constants
- IDENTIFIER
Public Class Methods
new(client)
click to toggle source
# File lib/acme_nsupdate/strategies/http01.rb, line 12 def initialize client @client = client end
Public Instance Methods
cleanup(challenges)
click to toggle source
# File lib/acme_nsupdate/strategies/http01.rb, line 30 def cleanup challenges @client.logger.info("Cleaning up challenges") challenges.each_value do |challenge| path = path challenge @client.logger.debug("Removing #{path}") File.delete path if File.exist? path end end
publish_challenges(order)
click to toggle source
# File lib/acme_nsupdate/strategies/http01.rb, line 16 def publish_challenges(order) map_authorizations(order) {|domain, authorization| challenge = authorization.http01 abort "Challenge http-01 not supported by this ACME server" unless challenge path = path challenge @client.logger.debug "Writing #{path} for #{domain}" FileUtils.mkdir_p File.dirname path File.write path, challenge.file_content challenge } end
Private Instance Methods
path(challenge)
click to toggle source
# File lib/acme_nsupdate/strategies/http01.rb, line 41 def path challenge File.join(@client.options[:webroot], challenge.filename) end