lib/acme/client/resources/challenges/base.rb in acme-client-2.0.1 vs lib/acme/client/resources/challenges/base.rb in acme-client-2.0.2
- old
+ new
@@ -15,17 +15,25 @@
def key_authorization
"#{token}.#{@client.jwk.thumbprint}"
end
def reload
- assign_attributes **@client.challenge(url: url).to_h
+ assign_attributes(**@client.challenge(url: url).to_h)
true
end
- def request_validation
- assign_attributes **@client.request_challenge_validation(
- url: url, key_authorization: key_authorization
+ def send_challenge_vallidation(url:, key_authorization:)
+ @client.request_challenge_validation(
+ url: url,
+ key_authorization: key_authorization
).to_h
+ end
+
+ def request_validation
+ assign_attributes(**send_challenge_vallidation(
+ url: url,
+ key_authorization: key_authorization
+ ))
true
end
def to_h
{ status: status, url: url, token: token, error: error }