diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-10-30 00:02:33 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-11-21 21:09:39 +0800 |
commit | 327dcd3622efd472c4d168cda657c55ef8e19889 (patch) | |
tree | deb67ea5b94dd0a6d257d00def88ce0b5ccb7b81 /cmd/puppeth/wizard_faucet.go | |
parent | ffc12f63ec57682e7c7f6653332856acbeef3183 (diff) | |
download | dexon-327dcd3622efd472c4d168cda657c55ef8e19889.tar dexon-327dcd3622efd472c4d168cda657c55ef8e19889.tar.gz dexon-327dcd3622efd472c4d168cda657c55ef8e19889.tar.bz2 dexon-327dcd3622efd472c4d168cda657c55ef8e19889.tar.lz dexon-327dcd3622efd472c4d168cda657c55ef8e19889.tar.xz dexon-327dcd3622efd472c4d168cda657c55ef8e19889.tar.zst dexon-327dcd3622efd472c4d168cda657c55ef8e19889.zip |
cmd/faucet, cmd/puppeth: drop GitHub support at official request
Diffstat (limited to 'cmd/puppeth/wizard_faucet.go')
-rw-r--r-- | cmd/puppeth/wizard_faucet.go | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go index e7d5ad488..7ecb376de 100644 --- a/cmd/puppeth/wizard_faucet.go +++ b/cmd/puppeth/wizard_faucet.go @@ -19,7 +19,6 @@ package main import ( "encoding/json" "fmt" - "net/http" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/log" @@ -79,51 +78,6 @@ func (w *wizard) deployFaucet() { log.Error("At least one funding tier must be set") return } - // Accessing GitHub gists requires API authorization, retrieve it - if infos.githubUser != "" { - fmt.Println() - fmt.Printf("Reuse previous (%s) GitHub API authorization (y/n)? (default = yes)\n", infos.githubUser) - if w.readDefaultString("y") != "y" { - infos.githubUser, infos.githubToken = "", "" - } - } - if infos.githubUser == "" { - // No previous authorization (or new one requested) - fmt.Println() - fmt.Println("Which GitHub user to verify Gists through? (default = none = rate-limited API)") - infos.githubUser = w.readDefaultString("") - - if infos.githubUser == "" { - log.Warn("Funding requests via GitHub will be heavily rate-limited") - } else { - fmt.Println() - fmt.Println("What is the GitHub personal access token of the user? (won't be echoed)") - infos.githubToken = w.readPassword() - - // Do a sanity check query against github to ensure it's valid - req, _ := http.NewRequest("GET", "https://api.github.com/user", nil) - req.SetBasicAuth(infos.githubUser, infos.githubToken) - res, err := http.DefaultClient.Do(req) - if err != nil { - log.Error("Failed to verify GitHub authentication", "err", err) - return - } - defer res.Body.Close() - - var msg struct { - Login string `json:"login"` - Message string `json:"message"` - } - if err = json.NewDecoder(res.Body).Decode(&msg); err != nil { - log.Error("Failed to decode authorization response", "err", err) - return - } - if msg.Login != infos.githubUser { - log.Error("GitHub authorization failed", "user", infos.githubUser, "message", msg.Message) - return - } - } - } // Accessing the reCaptcha service requires API authorizations, request it if infos.captchaToken != "" { fmt.Println() |