mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 15:22:38 -04:00
More docs for recovery_token_challenge, cleanup
This commit is contained in:
parent
b6422d74ad
commit
23cdee4fa1
1 changed files with 11 additions and 5 deletions
|
|
@ -1,9 +1,15 @@
|
|||
"""Recovery Token Identifier Validation Challenge."""
|
||||
import dialog
|
||||
|
||||
from letsencrypt.client import challenge
|
||||
|
||||
|
||||
class RecoveryToken(challenge.Challenge):
|
||||
"""Recovery Token Identifier Validation Challenge.
|
||||
|
||||
Based on draft-barnes-acme, section 6.4.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, configurator):
|
||||
super(RecoveryToken, self).__init__(configurator)
|
||||
|
|
@ -12,13 +18,13 @@ class RecoveryToken(challenge.Challenge):
|
|||
def perform(self, quiet=True):
|
||||
cancel, self.token = dialog.generic_input(
|
||||
"Please Input Recovery Token: ")
|
||||
if cancel == 1:
|
||||
return False
|
||||
|
||||
return True
|
||||
return cancel != 1
|
||||
|
||||
def cleanup(self):
|
||||
pass
|
||||
|
||||
def generate_response(self):
|
||||
return {"type": "recoveryToken", "token": self.token}
|
||||
return {
|
||||
"type": "recoveryToken",
|
||||
"token": self.token,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue