Fix the rootPath for auth

This commit is contained in:
creack
2013-03-22 05:52:13 -07:00
parent 9b5f0fac81
commit e726bdcce2
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -25,6 +25,15 @@ type AuthConfig struct {
rootPath string `json:-`
}
func NewAuthConfig(username, password, email, rootPath string) *AuthConfig {
return &AuthConfig{
Username: username,
Password: password,
Email: email,
rootPath: rootPath,
}
}
// create a base64 encoded auth string to store in config
func EncodeAuth(authConfig *AuthConfig) string {
authStr := authConfig.Username + ":" + authConfig.Password