-
I created the Identity Service client and I cached it. pClient, err := openstack.AuthenticatedClient(opts)
if err != nil {
return fmt.Errorf("error creating provider client: %w", err)
}
sClient, err := openstack.NewIdentityV3(pClient, gophercloud.EndpointOpts{})
if err != nil {
return fmt.Errorf("error creating service client: %w", err)
} Can I get |
Beta Was this translation helpful? Give feedback.
Answered by
kayrus
Jun 20, 2022
Replies: 1 comment 1 reply
-
You can get |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lego963
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can get
AuthResult
fromp.Client.Provider.GetAuthResult()
and then assert it tores.(*v3/tokens.GetResults
, afterwards you can directly access https://pkg.go.dev/github.com/gophercloud/gophercloud@v0.25.0/openstack/identity/v3/tokens#GetResult.ExtractTokenhttps://pkg.go.dev/github.com/gophercloud/gophercloud@v0.25.0/openstack/identity/v3/tokens#Token
FYI: #2111