summaryrefslogtreecommitdiff
path: root/vendor/acme-client/lib/acme/client/resources/challenges/http01.rb
blob: 4966091ad72efeb6772ef6afd523706fe3e17385 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class Acme::Client::Resources::Challenges::HTTP01 < Acme::Client::Resources::Challenges::Base
  CHALLENGE_TYPE = 'http-01'.freeze
  CONTENT_TYPE = 'text/plain'.freeze

  def content_type
    CONTENT_TYPE
  end

  def file_content
    authorization_key
  end

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