Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TokenProvider ¶
TokenProvider creates a token provider that handles file loading and error handling consistently.
Types ¶
type Method ¶
type Method struct {
// Scheme is the authentication scheme (e.g., "Bearer")
Scheme string
// TokenFn returns the authentication token
TokenFn func() string
// FromCtx extracts token from context
FromCtx func(context.Context) (string, bool)
}
Method represents a single authentication method configuration
type RoundTripper ¶
type RoundTripper struct {
// Transport is the underlying http.RoundTripper being wrapped. Required.
Transport http.RoundTripper
Auths []Method
}
RoundTripper wraps another http.RoundTripper and injects an authentication header with token into requests.
Click to show internal directories.
Click to hide internal directories.