From 18796d55a66f2f072349c54085516fe038bd8283 Mon Sep 17 00:00:00 2001 From: shin- Date: Wed, 1 May 2013 13:41:58 -0700 Subject: [PATCH] Fixed some login quirks --- auth/auth.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index a653f5563e..f8e94884dd 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -15,7 +15,7 @@ import ( const CONFIGFILE = ".dockercfg" // the registry server we want to login against -const INDEX_SERVER = "http://indexstaging-docker.dotcloud.com" +const INDEX_SERVER = "https://indexstaging-docker.dotcloud.com" type AuthConfig struct { Username string `json:"username"` @@ -123,8 +123,12 @@ func Login(authConfig *AuthConfig) (string, error) { } if reqStatusCode == 201 { - status = "Account Created\n" + status = "Account created. Please use the confirmation link we sent"+ + " to your e-mail to activate it.\n" storeConfig = true + } else if reqStatusCode == 403 { + return "", fmt.Errorf("Login: Your account hasn't been activated. "+ + "Please check your e-mail for a confirmation link.") } else if reqStatusCode == 400 { if string(reqBody) == "\"Username or email already exists\"" { req, err := http.NewRequest("GET", INDEX_SERVER+"/v1/users/", nil)