Support reauth on identity endpoints with a base path
Fix re-authentication to use the correct endpoint when the identity endpoint has a base path (e.g. https://keystone.example.com/somepath/v2.0)
diff --git a/openstack/client.go b/openstack/client.go
index 33602a6..42f99da 100644
--- a/openstack/client.go
+++ b/openstack/client.go
@@ -110,7 +110,7 @@
if options.AllowReauth {
client.ReauthFunc = func() error {
client.TokenID = ""
- return AuthenticateV2(client, options)
+ return v2auth(client, endpoint, options)
}
}
client.TokenID = token.ID
@@ -168,7 +168,7 @@
if options.AllowReauth {
client.ReauthFunc = func() error {
client.TokenID = ""
- return AuthenticateV3(client, options)
+ return v3auth(client, endpoint, options)
}
}
client.EndpointLocator = func(opts gophercloud.EndpointOpts) (string, error) {