aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth/wizard_faucet.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/puppeth/wizard_faucet.go')
-rw-r--r--cmd/puppeth/wizard_faucet.go25
1 files changed, 24 insertions, 1 deletions
diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go
index 71d1c910b..f3fd7c2a1 100644
--- a/cmd/puppeth/wizard_faucet.go
+++ b/cmd/puppeth/wizard_faucet.go
@@ -71,7 +71,7 @@ func (w *wizard) deployFaucet() {
// Accessing GitHub gists requires API authorization, retrieve it
if infos.githubUser != "" {
fmt.Println()
- fmt.Printf("Reused previous (%s) GitHub API authorization (y/n)? (default = yes)\n", infos.githubUser)
+ fmt.Printf("Reuse previous (%s) GitHub API authorization (y/n)? (default = yes)\n", infos.githubUser)
if w.readDefaultString("y") != "y" {
infos.githubUser, infos.githubToken = "", ""
}
@@ -109,6 +109,29 @@ func (w *wizard) deployFaucet() {
return
}
}
+ // Accessing the reCaptcha service requires API authorizations, request it
+ if infos.captchaToken != "" {
+ fmt.Println()
+ fmt.Println("Reuse previous reCaptcha API authorization (y/n)? (default = yes)")
+ if w.readDefaultString("y") != "y" {
+ infos.captchaToken, infos.captchaSecret = "", ""
+ }
+ }
+ if infos.captchaToken == "" {
+ // No previous authorization (or old one discarded)
+ fmt.Println()
+ fmt.Println("Enable reCaptcha protection against robots (y/n)? (default = no)")
+ if w.readDefaultString("n") == "y" {
+ // Captcha protection explicitly requested, read the site and secret keys
+ fmt.Println()
+ fmt.Printf("What is the reCaptcha site key to authenticate human users?\n")
+ infos.captchaToken = w.readString()
+
+ fmt.Println()
+ fmt.Printf("What is the reCaptcha secret key to verify authentications? (won't be echoed)\n")
+ infos.captchaSecret = w.readPassword()
+ }
+ }
// Figure out where the user wants to store the persistent data
fmt.Println()
if infos.node.datadir == "" {