blob: 17fefa04ff0749a316a1277f46a27f4b941fc8da [file] [log] [blame]
Ash Wilson89466cc2014-08-29 11:27:39 -04001package gophercloud
2
Ash Wilson89466cc2014-08-29 11:27:39 -04003// ProviderClient stores details that are required to interact with any services within a specific provider's API.
4//
5// Generally, you acquire a ProviderClient by calling the `NewClient()` method in the appropriate provider's child package,
6// providing whatever authentication credentials are required.
7type ProviderClient struct {
Ash Wilson89466cc2014-08-29 11:27:39 -04008
9 // Options remembers the original authentication parameters, if reauthentication is enabled.
10 Options AuthOptions
11
Ash Wilson89466cc2014-08-29 11:27:39 -040012 // TokenID is the most recently valid token issued.
13 TokenID string
14}
15
Ash Wilson89466cc2014-08-29 11:27:39 -040016// AuthenticatedHeaders returns a map of HTTP headers that are common for all authenticated service
17// requests.
18func (client *ProviderClient) AuthenticatedHeaders() map[string]string {
19 return map[string]string{"X-Auth-Token": client.TokenID}
20}