コード例 #1
0
ファイル: auth.go プロジェクト: sfermigier/nanobox
// Reauthenticate
func Reauthenticate() (string, string) {
	fmt.Println(`
It appears the Username or API token the CLI is trying to use does not match what
we have on record. To continue, please login to verify your account:
  `)

	Userslug := printutil.Prompt("Username: "******"Password: ")

	// authenticate
	return authenticate(Userslug, password)
}
コード例 #2
0
ファイル: auth.go プロジェクト: sfermigier/nanobox
// Authenticate
func Authenticate() (string, string) {
	fmt.Printf(stylish.Bullet("Authenticating..."))

	//
	if !authenticated() {
		fmt.Println("Before continuing, please login to your account:")

		Userslug := printutil.Prompt("Username: "******"Password: ")

		// authenticate
		return authenticate(Userslug, password)
	}

	return creds.Userslug, creds.Authtoken
}