Ash Wilson | 70dfe0c | 2014-08-28 13:57:09 -0400 | [diff] [blame] | 1 | package gophercloud |
| 2 | |
Ash Wilson | e058e34 | 2014-08-29 10:31:41 -0400 | [diff] [blame] | 3 | import "time" |
| 4 | |
Ash Wilson | 70dfe0c | 2014-08-28 13:57:09 -0400 | [diff] [blame] | 5 | // AuthResults encapsulates the raw results from an authentication request. As OpenStack allows |
| 6 | // extensions to influence the structure returned in ways that Gophercloud cannot predict at |
| 7 | // compile-time, you should use type-safe accessors to work with the data represented by this type, |
| 8 | // such as ServiceCatalog() and TokenID(). |
| 9 | type AuthResults interface { |
| 10 | |
| 11 | // Retrieve the authentication token's value from the authentication response. |
Ash Wilson | b6943e0 | 2014-08-28 14:21:41 -0400 | [diff] [blame] | 12 | TokenID() (string, error) |
Ash Wilson | e058e34 | 2014-08-29 10:31:41 -0400 | [diff] [blame] | 13 | |
| 14 | // ExpiresAt retrieves the token's expiration time. |
| 15 | ExpiresAt() (time.Time, error) |
Ash Wilson | 70dfe0c | 2014-08-28 13:57:09 -0400 | [diff] [blame] | 16 | } |