only cache credentials if AllowReauth is set to true
diff --git a/openstack/client.go b/openstack/client.go
index 876df74..55c298c 100644
--- a/openstack/client.go
+++ b/openstack/client.go
@@ -110,8 +110,8 @@
if options.AllowReauth {
client.ReauthFunc = AuthenticateV2
+ client.AuthOptions = options
}
- client.AuthOptions = options
client.TokenID = token.ID
client.EndpointLocator = func(opts gophercloud.EndpointOpts) (string, error) {
return V2EndpointURL(catalog, opts)
@@ -140,8 +140,8 @@
if options.AllowReauth {
client.ReauthFunc = AuthenticateV3
+ client.AuthOptions = options
}
- client.AuthOptions = options
client.EndpointLocator = func(opts gophercloud.EndpointOpts) (string, error) {
return V3EndpointURL(v3Client, opts)
}