Class: Acmesmith::AuthorizationService::AuthorizationProcess
- Inherits:
-
Struct
- Object
- Struct
- Acmesmith::AuthorizationService::AuthorizationProcess
- Defined in:
- lib/acmesmith/authorization_service.rb
Instance Attribute Summary collapse
-
#authorization ⇒ Acme::Client::Resources::Authorization
readonly
Authz object.
-
#challenge ⇒ Acme::Client::Resources::Challenges::Base
readonly
Challenge.
-
#challenge_responder ⇒ Acmesmith::ChallengeResponders::Base
readonly
Responder.
-
#domain ⇒ String
readonly
Domain name.
Instance Method Summary collapse
Instance Attribute Details
#authorization ⇒ Acme::Client::Resources::Authorization (readonly)
Returns 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 |
#challenge ⇒ Acme::Client::Resources::Challenges::Base (readonly)
Returns 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_responder ⇒ Acmesmith::ChallengeResponders::Base (readonly)
Returns responder.
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 |
#domain ⇒ String (readonly)
Returns 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
15 16 17 |
# File 'lib/acmesmith/authorization_service.rb', line 15 def completed? invalid? || valid? end |
#invalid? ⇒ Boolean
19 20 21 |
# File 'lib/acmesmith/authorization_service.rb', line 19 def invalid? challenge.status == 'invalid' end |
#responder_id ⇒ Object
27 28 29 |
# File 'lib/acmesmith/authorization_service.rb', line 27 def responder_id challenge_responder.__id__ end |
#valid? ⇒ Boolean
23 24 25 |
# File 'lib/acmesmith/authorization_service.rb', line 23 def valid? challenge.status == 'valid' end |