UI: implement SetAuth/GenerateAuth handlers for changing credentials.

This commit is contained in:
Krishna Srinivas
2016-03-21 23:45:08 +05:30
parent 186998ad99
commit 5201905ad0
3 changed files with 88 additions and 18 deletions

View File

@@ -48,17 +48,14 @@ func configureServerHandler(filesystem fs.Filesystem) http.Handler {
}
// Initialize minio client for AWS Signature Version '4'
disableSSL := !isSSL() // Insecure true when SSL is false.
client, e := minio.NewV4(net.JoinHostPort(host, port), cred.AccessKeyID, cred.SecretAccessKey, disableSSL)
insecure := !isSSL() // Insecure true when SSL is false.
client, e := minio.NewV4(net.JoinHostPort(host, port), cred.AccessKeyID, cred.SecretAccessKey, insecure)
fatalIf(probe.NewError(e), "Unable to initialize minio client", nil)
// Initialize Web.
web := &webAPI{
FSPath: filesystem.GetRootPath(),
Client: client,
apiAddress: addr,
accessKeyID: cred.AccessKeyID,
secretAccessKey: cred.SecretAccessKey,
FSPath: filesystem.GetRootPath(),
Client: client,
}
// Initialize router.