A Provider is the interface for any component which will provide credentials Value. A provider is required to manage its own Expired state, and what to be expired means.
| 57 | // Value. A provider is required to manage its own Expired state, and what to |
| 58 | // be expired means. |
| 59 | type Provider interface { |
| 60 | // RetrieveWithCredContext returns nil if it successfully retrieved the |
| 61 | // value. Error is returned if the value were not obtainable, or empty. |
| 62 | // optionally takes CredContext for additional context to retrieve credentials. |
| 63 | RetrieveWithCredContext(cc *CredContext) (Value, error) |
| 64 | |
| 65 | // Retrieve returns nil if it successfully retrieved the value. |
| 66 | // Error is returned if the value were not obtainable, or empty. |
| 67 | // |
| 68 | // Deprecated: Retrieve() exists for historical compatibility and should not |
| 69 | // be used. To get new credentials use the RetrieveWithCredContext function |
| 70 | // to ensure the proper context (i.e. HTTP client) will be used. |
| 71 | Retrieve() (Value, error) |
| 72 | |
| 73 | // IsExpired returns if the credentials are no longer valid, and need |
| 74 | // to be retrieved. |
| 75 | IsExpired() bool |
| 76 | } |
| 77 | |
| 78 | // CredContext is passed to the Retrieve function of a provider to provide |
| 79 | // some additional context to retrieve credentials. |
no outgoing calls
no test coverage detected