blob: f9e6ee5e2d2807a08d3d93baadb9a1e82138a44a [file] [log] [blame]
Ash Wilson70dfe0c2014-08-28 13:57:09 -04001package gophercloud
2
3// AuthOptions lets anyone calling Authenticate() supply the required access credentials.
4// Its fields are the union of those recognized by each identity implementation and provider.
5type AuthOptions struct {
6
7 // IdentityEndpoint specifies the HTTP endpoint offering the Identity API of the appropriate version.
8 // Required by the identity services, but often populated by a provider Client.
9 IdentityEndpoint string
10
11 // Username is required if using Identity V2 API.
12 // Consult with your provider's control panel to discover your account's username.
13 // In Identity V3, either UserID or a combination of Username and DomainID or DomainName.
14 Username, UserID string
15
16 // Exactly one of Password or ApiKey is required for the Identity V2 and V3 APIs.
17 // Consult with your provider's control panel to discover your account's preferred method of authentication.
18 Password, APIKey string
19
20 // At most one of DomainID and DomainName must be provided if using Username with Identity V3.
21 // Otherwise, either are optional.
22 DomainID, DomainName string
23
24 // The TenantID and TenantName fields are optional for the Identity V2 API.
25 // Some providers allow you to specify a TenantName instead of the TenantId.
26 // Some require both. Your provider's authentication policies will determine
27 // how these fields influence authentication.
28 TenantID, TenantName string
29
30 // AllowReauth should be set to true if you grant permission for Gophercloud to
31 // cache your credentials in memory, and to allow Gophercloud to attempt to
32 // re-authenticate automatically if/when your token expires. If you set it to
33 // false, it will not cache these settings, but re-authentication will not be
34 // possible. This setting defaults to false.
35 AllowReauth bool
36}