Class: Bullion::Models::Authorization

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/bullion/models/authorization.rb

Overview

ACMEv2 Authorization model

Instance Method Summary collapse

Instance Method Details

#init_valuesObject



16
17
18
# File 'lib/bullion/models/authorization.rb', line 16

def init_values
  self.expires ||= Time.now + (60 * 60)
end

#prep_challenges!Object



20
21
22
23
24
25
26
27
28
# File 'lib/bullion/models/authorization.rb', line 20

def prep_challenges!
  %w[http-01 dns-01].each do |type|
    chall = Challenge.new
    chall.authorization = self
    chall.acme_type = type

    chall.save
  end
end