Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenCredentials ¶
type TokenCredentials struct {
// contains filtered or unexported fields
}
TokenCredentials is a gRPC PerRPCCredentials that attaches a bearer token produced by fetchToken to each outbound RPC. It does no caching; the provider behind fetchToken owns the lifecycle (rotation, expiry-aware refresh, stampede protection). RequireTransportSecurity returns true per RFC 9700.
func NewTokenCredentials ¶
func (*TokenCredentials) GetRequestMetadata ¶
func (*TokenCredentials) RequireTransportSecurity ¶
func (c *TokenCredentials) RequireTransportSecurity() bool
RequireTransportSecurity returns true so the bearer never attaches to plaintext dials, per RFC 9700.
type TokenProvider ¶
type TokenProvider interface {
GetToken(ctx context.Context, rpcAddress string) (token string, err error)
}
TokenProvider supplies auth tokens for outbound remote-cluster RPCs. rpcAddress is the receiver's host:port. Implementations are responsible for their own caching: GetToken is called on every outbound RPC, so a provider that incurs IdP round-trips must cache internally. A nil TokenProvider means no auth header is sent; downstream consumers (RPCFactory) handle this case directly.