rackspace / gophercloud

A Go SDK for OpenStack. IN FEATURE FREEZE. See Issue #592
http://gophercloud.io
Other
456 stars 181 forks source link

[wip] Fixing v3 token auth #574

Closed jtopjian closed 8 years ago

jtopjian commented 8 years ago

This commit fixes identity v3 token authentication by looking at the correct struct for the token. An acceptance test has been added to verify token authentication works.

jtopjian commented 8 years ago

I feel like the acceptance test is set up a little odd. It tries to make due with what devstack provides and accounts for missing info (like the Domain ID).

jtopjian commented 8 years ago

Ah, I missed the unit tests in the v3/tokens package. This makes things very confusing...

The AuthOptions struct is able to take a TokenID, and Identity v2 will look there to authenticate via token. But Identity v3 is looking at the Client for the token. I feel this is incorrect.

The POST requests in the API docs between token authentication and password authentication look the same. Therefore, I feel the token should be referenced in AuthOptions and not the client. But maybe I'm incorrect...

@jrperritt thoughts?

jtopjian commented 8 years ago

Closing in favor of #528 - totally missed that one...