Package: endpointcreds
Overview
Package endpointcreds provides support for retrieving credentials from an arbitrary HTTP endpoint.
The credentials endpoint Provider can receive both static and refreshable credentials that will expire. Credentials are static when an “Expiration” value is not provided in the endpoint's response.
Static credentials will never expire once they have been retrieved. The format of the static credentials response:
{
"AccessKeyId" : "MUA...",
"SecretAccessKey" : "/7PC5om....",
}
Refreshable credentials will expire within the “ExpiryWindow” of the Expiration value in the response. The format of the refreshable credentials response:
{
"AccessKeyId" : "MUA...",
"SecretAccessKey" : "/7PC5om....",
"Token" : "AQoDY....=",
"Expiration" : "2016-02-25T06:03:31Z"
}
Errors should be returned in the following format and only returned with 400 or 500 HTTP status codes.
{
"code": "ErrorCode",
"message": "Helpful error message."
}
Constants
-
const ProviderName = readonly
ProviderName is the name of the credentials provider.
-
Value:
`CredentialsEndpointProvider`
Type Summary collapse
-
Provider
struct
Provider satisfies the credentials.Provider interface, and is a client to retrieve credentials from an arbitrary endpoint.
Function Summary collapse
-
func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) *credentials.Credentials
NewCredentialsClient returns a pointer to a new Credentials object wrapping the endpoint credentials Provider.
-
func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) credentials.Provider
NewProviderClient returns a credentials Provider for retrieving AWS credentials from arbitrary endpoint.
Function Details
func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) *credentials.Credentials
NewCredentialsClient returns a pointer to a new Credentials object wrapping the endpoint credentials Provider.
105 106 107 |
// File 'aws/credentials/endpointcreds/provider.go', line 105
|
func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) credentials.Provider
NewProviderClient returns a credentials Provider for retrieving AWS credentials from arbitrary endpoint.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
// File 'aws/credentials/endpointcreds/provider.go', line 79
|