Merge pull request #1911 from erictune/token_client

Handle auth files with BearerToken sections.
This commit is contained in:
Clayton Coleman
2014-10-21 14:08:42 -04:00
6 changed files with 39 additions and 14 deletions

View File

@@ -88,6 +88,7 @@ func loadClientOrDie() *client.Client {
config.CAFile = auth.CAFile
config.CertFile = auth.CertFile
config.KeyFile = auth.KeyFile
config.BearerToken = auth.BearerToken
if auth.Insecure != nil {
config.Insecure = *auth.Insecure
}

View File

@@ -216,6 +216,9 @@ func main() {
if auth.KeyFile != "" {
clientConfig.KeyFile = auth.KeyFile
}
if auth.BearerToken != "" {
clientConfig.BearerToken = auth.BearerToken
}
if auth.Insecure != nil {
clientConfig.Insecure = *auth.Insecure
}