class Acmesmith::ChallengeResponders::Base

Public Class Methods

new() click to toggle source
# File lib/acmesmith/challenge_responders/base.rb, line 21
def initialize()
end

Public Instance Methods

applicable?(domain) click to toggle source

@param domain [String] target FQDN for a ACME authorization challenge @return [true, false] true when a responder is able to challenge against given domain name

# File lib/acmesmith/challenge_responders/base.rb, line 12
def applicable?(domain)
  true
end
cap_respond_all?() click to toggle source

@return [true, false] true when implements respond_all, cleanup_all

# File lib/acmesmith/challenge_responders/base.rb, line 17
def cap_respond_all?
  false
end
cleanup(domain, challenge) click to toggle source

If cap_respond_all? is true, you don't need to implement this method.

# File lib/acmesmith/challenge_responders/base.rb, line 58
def cleanup(domain, challenge)
  if cap_respond_all?
    cleanup_all([domain, challenge])
  else
    raise NotImplementedError
  end
end
cleanup_all(*domain_and_challenges) click to toggle source

Clean up responses for the given challenges (1 or more). @param domain_and_challenges [Array<(String, Acme::Client::Resources::Challenges::Base)>] array of tuple of domain name and ACME challenge

# File lib/acmesmith/challenge_responders/base.rb, line 38
def cleanup_all(*domain_and_challenges)
  if cap_respond_all?
    raise NotImplementedError
  else
    domain_and_challenges.each do |dc|
      cleanup(*dc)
    end
  end
end
respond(domain, challenge) click to toggle source

If cap_respond_all? is true, you don't need to implement this method.

# File lib/acmesmith/challenge_responders/base.rb, line 49
def respond(domain, challenge)
  if cap_respond_all?
    respond_all([domain, challenge])
  else
    raise NotImplementedError
  end
end
respond_all(*domain_and_challenges) click to toggle source

Respond to the given challenges (1 or more). @param domain_and_challenges [Array<(String, Acme::Client::Resources::Challenges::Base)>] array of tuple of domain name and ACME challenge

# File lib/acmesmith/challenge_responders/base.rb, line 26
def respond_all(*domain_and_challenges)
  if cap_respond_all?
    raise NotImplementedError
  else
    domain_and_challenges.each do |dc|
      respond(*dc)
    end
  end
end
support?(type) click to toggle source

@param type [String] ACME challenge type (dns-01, http-01, …) @return [true, false] true when given challenge type is supported

# File lib/acmesmith/challenge_responders/base.rb, line 6
def support?(type)
  raise NotImplementedError
end