Documentation
¶
Overview ¶
Package auth turns resolved credentials into request headers.
Index ¶
Constants ¶
View Source
const RefreshWindow = 60 * time.Second
RefreshWindow is how close to expiry a cached token may get before blip replaces it.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint identifies a secret without revealing it, so two runs can be compared.
Types ¶
type Authenticator ¶
type Authenticator interface {
// Apply sets whatever headers the mechanism needs.
Apply(ctx context.Context, req *http.Request) error
// Describe reports the mechanism and how the secret was obtained. Never secret.
Describe(ctx context.Context) (string, error)
// Secrets lists values that must be redacted from any output.
Secrets() []string
// PermitsHost reports whether this credential may be sent to a host.
PermitsHost(host string) bool
// Pinned reports whether the profile named the hosts it trusts.
Pinned() bool
}
Authenticator applies a credential to outgoing requests.
func New ¶
New builds an authenticator for a resolved profile. client is used only by oauth2_cc, which has to make a request of its own.
func None ¶
func None() Authenticator
None is the authenticator for environments with no auth configured.
Click to show internal directories.
Click to hide internal directories.