Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory() component.ExtensionFactory
NewFactory creates a factory for the static bearer token Authenticator extension.
Types ¶
type BearerTokenAuth ¶
type BearerTokenAuth struct {
// contains filtered or unexported fields
}
BearerTokenAuth is an implementation of configauth.GRPCClientAuthenticator. It embeds a static authorization "bearer" token in every rpc call.
func (*BearerTokenAuth) PerRPCCredentials ¶
func (b *BearerTokenAuth) PerRPCCredentials() (credentials.PerRPCCredentials, error)
PerRPCCredentials returns PerRPCAuth an implementation of credentials.PerRPCCredentials that
type Config ¶
type Config struct { config.ExtensionSettings `mapstructure:",squash"` // BearerToken specifies the bearer token to use for every RPC. BearerToken string `mapstructure:"token,omitempty"` }
Config specifies how the Per-RPC bearer token based authentication data should be obtained.
type PerRPCAuth ¶
type PerRPCAuth struct {
// contains filtered or unexported fields
}
PerRPCAuth is a gRPC credentials.PerRPCCredentials implementation that returns an 'authorization' header.
func (*PerRPCAuth) GetRequestMetadata ¶
GetRequestMetadata returns the request metadata to be used with the RPC.
func (*PerRPCAuth) RequireTransportSecurity ¶
func (c *PerRPCAuth) RequireTransportSecurity() bool
RequireTransportSecurity always returns true for this implementation. Passing bearer tokens in plain-text connections is a bad idea.