More .Provider references in OS identity v3.
diff --git a/openstack/identity/v3/tokens/requests.go b/openstack/identity/v3/tokens/requests.go
index d8d74fb..351d7d6 100644
--- a/openstack/identity/v3/tokens/requests.go
+++ b/openstack/identity/v3/tokens/requests.go
@@ -83,7 +83,7 @@
}
if options.Password == "" {
- if c.Provider.TokenID != "" {
+ if c.TokenID != "" {
// Because we aren't using password authentication, it's an error to also provide any of the user-based authentication
// parameters.
if options.Username != "" {
@@ -102,7 +102,7 @@
// Configure the request for Token authentication.
req.Auth.Identity.Methods = []string{"token"}
req.Auth.Identity.Token = &tokenReq{
- ID: c.Provider.TokenID,
+ ID: c.TokenID,
}
} else {
// If no password or token ID are available, authentication can't continue.
diff --git a/openstack/identity/v3/tokens/requests_test.go b/openstack/identity/v3/tokens/requests_test.go
index 367c73c..a61bb2c 100644
--- a/openstack/identity/v3/tokens/requests_test.go
+++ b/openstack/identity/v3/tokens/requests_test.go
@@ -16,7 +16,7 @@
defer testhelper.TeardownHTTP()
client := gophercloud.ServiceClient{
- Provider: &gophercloud.ProviderClient{
+ ProviderClient: &gophercloud.ProviderClient{
TokenID: "12345abcdef",
},
Endpoint: testhelper.Endpoint(),
@@ -47,11 +47,11 @@
defer testhelper.TeardownHTTP()
client := gophercloud.ServiceClient{
- Provider: &gophercloud.ProviderClient{},
- Endpoint: testhelper.Endpoint(),
+ ProviderClient: &gophercloud.ProviderClient{},
+ Endpoint: testhelper.Endpoint(),
}
if includeToken {
- client.Provider.TokenID = "abcdef123456"
+ client.TokenID = "abcdef123456"
}
_, err := Create(&client, options, scope).Extract()
@@ -246,8 +246,8 @@
defer testhelper.TeardownHTTP()
client := gophercloud.ServiceClient{
- Provider: &gophercloud.ProviderClient{},
- Endpoint: testhelper.Endpoint(),
+ ProviderClient: &gophercloud.ProviderClient{},
+ Endpoint: testhelper.Endpoint(),
}
testhelper.Mux.HandleFunc("/auth/tokens", func(w http.ResponseWriter, r *http.Request) {
@@ -401,7 +401,7 @@
defer testhelper.TeardownHTTP()
client := gophercloud.ServiceClient{
- Provider: &gophercloud.ProviderClient{
+ ProviderClient: &gophercloud.ProviderClient{
TokenID: "12345abcdef",
},
Endpoint: testhelper.Endpoint(),
@@ -433,7 +433,7 @@
func prepareAuthTokenHandler(t *testing.T, expectedMethod string, status int) gophercloud.ServiceClient {
client := gophercloud.ServiceClient{
- Provider: &gophercloud.ProviderClient{
+ ProviderClient: &gophercloud.ProviderClient{
TokenID: "12345abcdef",
},
Endpoint: testhelper.Endpoint(),