Exemplo n.º 1
0
// 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)
}
Exemplo n.º 2
0
// 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
}