blob: 1a1faa5fe0e0587efed55fd3540bfe3eb31a1959 [file] [log] [blame]
Ash Wilson70dfe0c2014-08-28 13:57:09 -04001package gophercloud
2
Ash Wilsone058e342014-08-29 10:31:41 -04003import "time"
4
Ash Wilson70dfe0c2014-08-28 13:57:09 -04005// 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,
Jamie Hannafordb280dea2014-10-24 15:14:06 +02008// such as ServiceCatalog and TokenID.
Ash Wilson70dfe0c2014-08-28 13:57:09 -04009type AuthResults interface {
Jamie Hannafordb280dea2014-10-24 15:14:06 +020010 // TokenID returns the token's ID value from the authentication response.
Ash Wilsonb6943e02014-08-28 14:21:41 -040011 TokenID() (string, error)
Ash Wilsone058e342014-08-29 10:31:41 -040012
13 // ExpiresAt retrieves the token's expiration time.
14 ExpiresAt() (time.Time, error)
Ash Wilson70dfe0c2014-08-28 13:57:09 -040015}