Class: Acmesmith::AuthorizationService::AuthorizationProcess

Inherits:
Struct
  • Object
show all
Defined in:
lib/acmesmith/authorization_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorizationAcme::Client::Resources::Authorization (readonly)

Returns authz object.

Returns:

  • (Acme::Client::Resources::Authorization)

    authz object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/acmesmith/authorization_service.rb', line 14

AuthorizationProcess = Struct.new(:domain, :authorization, :challenge_responder, :challenge, keyword_init: true) do
  def completed?
    invalid? || valid?
  end

  def invalid?
    challenge.status == 'invalid'
  end

  def valid?
    challenge.status == 'valid'
  end

  def responder_id
    challenge_responder.__id__
  end
end

#challengeAcme::Client::Resources::Challenges::Base (readonly)

Returns challenge.

Returns:

  • (Acme::Client::Resources::Challenges::Base)

    challenge



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/acmesmith/authorization_service.rb', line 14

AuthorizationProcess = Struct.new(:domain, :authorization, :challenge_responder, :challenge, keyword_init: true) do
  def completed?
    invalid? || valid?
  end

  def invalid?
    challenge.status == 'invalid'
  end

  def valid?
    challenge.status == 'valid'
  end

  def responder_id
    challenge_responder.__id__
  end
end

#challenge_responderAcmesmith::ChallengeResponders::Base (readonly)

Returns responder.

Returns:



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/acmesmith/authorization_service.rb', line 14

AuthorizationProcess = Struct.new(:domain, :authorization, :challenge_responder, :challenge, keyword_init: true) do
  def completed?
    invalid? || valid?
  end

  def invalid?
    challenge.status == 'invalid'
  end

  def valid?
    challenge.status == 'valid'
  end

  def responder_id
    challenge_responder.__id__
  end
end

#domainString (readonly)

Returns domain name.

Returns:

  • (String)

    domain name



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/acmesmith/authorization_service.rb', line 14

AuthorizationProcess = Struct.new(:domain, :authorization, :challenge_responder, :challenge, keyword_init: true) do
  def completed?
    invalid? || valid?
  end

  def invalid?
    challenge.status == 'invalid'
  end

  def valid?
    challenge.status == 'valid'
  end

  def responder_id
    challenge_responder.__id__
  end
end

Instance Method Details

#completed?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/acmesmith/authorization_service.rb', line 15

def completed?
  invalid? || valid?
end

#invalid?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/acmesmith/authorization_service.rb', line 19

def invalid?
  challenge.status == 'invalid'
end

#responder_idObject



27
28
29
# File 'lib/acmesmith/authorization_service.rb', line 27

def responder_id
  challenge_responder.__id__
end

#valid?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/acmesmith/authorization_service.rb', line 23

def valid?
  challenge.status == 'valid'
end