Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions auth_aksk_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ type AKSKAuthOptions struct {
// "OS_AUTH_URL" in the information provided by the cloud operator.
IdentityEndpoint string `json:"-"`

// user project id
ProjectId string

ProjectName string

// region
Region string

// cloud service domain, example: myhwclouds.com
// IAM user project id and name
ProjectId string
ProjectName string

// IAM account name and id
Domain string
DomainID string

// cloud service domain for BSS
BssDomain string
BssDomainID string

AccessKey string //Access Key
SecretKey string //Secret key
AccessKey string //Access Key
SecretKey string //Secret key
SecurityToken string //Security Token for temporary Access Key

// AgencyNmae is the name of agnecy
AgencyName string
Expand All @@ -40,7 +40,7 @@ type AKSKAuthOptions struct {
DelegatedProject string
}

// Implements the method of AuthOptionsProvider
// GetIdentityEndpoint implements the method of AuthOptionsProvider
func (opts AKSKAuthOptions) GetIdentityEndpoint() string {
return opts.IdentityEndpoint
}
3 changes: 3 additions & 0 deletions provider_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts)
if client.AKSKAuthOptions.DomainID != "" {
req.Header.Set("X-Domain-Id", client.AKSKAuthOptions.DomainID)
}
if client.AKSKAuthOptions.SecurityToken != "" {
req.Header.Set("X-Security-Token", client.AKSKAuthOptions.SecurityToken)
}
}

// Issue the request.
Expand Down