CredContext returns the context for fetching credentials
()
| 1147 | |
| 1148 | // CredContext returns the context for fetching credentials |
| 1149 | func (c *Client) CredContext() *credentials.CredContext { |
| 1150 | httpClient := c.httpClient |
| 1151 | if httpClient == nil { |
| 1152 | httpClient = http.DefaultClient |
| 1153 | } |
| 1154 | return &credentials.CredContext{ |
| 1155 | Client: httpClient, |
| 1156 | Endpoint: c.endpointURL.String(), |
| 1157 | } |
| 1158 | } |
| 1159 | |
| 1160 | // GetCreds returns the access creds for the client |
| 1161 | func (c *Client) GetCreds() (credentials.Value, error) { |