Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey struct {
// contains filtered or unexported fields
}
type APIKeyConfig ¶
type Authenticator ¶
Authenticator defines an interface for applying authentication to outgoing requests.
func Build ¶ added in v0.2.0
func Build(authType string, options json.RawMessage) (Authenticator, error)
Build constructs an authenticator for the given auth type from its raw JSON options. It is the single entry point callers (e.g. the remote Manager) use, so they need not know about individual strategies. Secret references are resolved here, once; an unresolvable reference is a loud error.
type Bearer ¶
type Bearer struct {
// contains filtered or unexported fields
}
type BearerConfig ¶
type BearerConfig struct {
Token SecretRef `json:"token"`
}
type OAuth2 ¶
type OAuth2 struct {
// contains filtered or unexported fields
}
func NewOAuth2 ¶
NewOAuth2 builds an OAuth2 client-credentials authenticator from already-resolved values.
func (*OAuth2) SetInsecureSkipTLSVerify ¶ added in v0.2.0
SetInsecureSkipTLSVerify controls whether the OAuth2 token request client skips certificate verification. This is intended for local development with self-signed identity-provider certificates only.
type OAuth2Config ¶
type SecretRef ¶ added in v0.2.0
type SecretRef string
SecretRef is a secret-bearing configuration value: a literal, or a reference whose scheme prefix names where the value comes from. It is the raw string as written in config — it unmarshals from and marshals to a plain JSON string, so only the single prefixed-string form is supported; there is intentionally no object form.
"plain-value" // literal (the default, backward compatible) "env:NAME" // read from environment variable NAME "file:/path/to/file" // read from a file (trailing whitespace trimmed) "literal:env:foo" // explicit literal escape hatch
A value whose prefix is not a known scheme (including one with no colon at all) is treated as a literal. Resolution — the I/O — is a separate step; see Resolve.
func (SecretRef) Resolve ¶ added in v0.2.0
Resolve reads the concrete value for the reference. This is the single I/O seam: the only place that reads env/files and the only place that can fail. A missing env var or an unreadable/empty file is a loud error — a reference never silently resolves to the empty string. A literal is returned as-is; an empty literal (or the zero value) is allowed for backward compatibility.