Class: Gitlab::LetsEncrypt::Client

Inherits:
Object
  • Object
show all
Includes:
Utils::StrongMemoize
Defined in:
lib/gitlab/lets_encrypt/client.rb

Constant Summary collapse

PRODUCTION_DIRECTORY_URL =
'https://acme-v02.api.letsencrypt.org/directory'
STAGING_DIRECTORY_URL =
'https://acme-staging-v02.api.letsencrypt.org/directory'

Instance Method Summary collapse

Methods included from Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#load_challenge(url) ⇒ Object


27
28
29
30
31
# File 'lib/gitlab/lets_encrypt/client.rb', line 27

def load_challenge(url)
  

  ::Gitlab::LetsEncrypt::Challenge.new(acme_client.challenge(url: url))
end

#load_order(url) ⇒ Object


19
20
21
22
23
24
25
# File 'lib/gitlab/lets_encrypt/client.rb', line 19

def load_order(url)
  

  # rubocop: disable CodeReuse/ActiveRecord
  ::Gitlab::LetsEncrypt::Order.new(acme_client.order(url: url))
  # rubocop: enable CodeReuse/ActiveRecord
end

#new_order(domain_name) ⇒ Object


11
12
13
14
15
16
17
# File 'lib/gitlab/lets_encrypt/client.rb', line 11

def new_order(domain_name)
  

  acme_order = acme_client.new_order(identifiers: [domain_name])

  ::Gitlab::LetsEncrypt::Order.new(acme_order)
end

#terms_of_service_urlObject


33
34
35
# File 'lib/gitlab/lets_encrypt/client.rb', line 33

def terms_of_service_url
  acme_client.terms_of_service
end