Documentation
¶
Overview ¶
Package configauth implements the configuration settings to ensure authentication on incoming requests, and allows exporters to add authentication on outgoing requests.
Index ¶
- type Authentication
- func (a Authentication) GetClientAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (auth.Client, error)
- func (a Authentication) GetClientAuthenticatorContext(ctx context.Context, extensions map[component.ID]component.Component) (auth.Client, error)deprecated
- func (a Authentication) GetServerAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (auth.Server, error)
- func (a Authentication) GetServerAuthenticatorContext(ctx context.Context, extensions map[component.ID]component.Component) (auth.Server, error)deprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct { // AuthenticatorID specifies the name of the extension to use in order to authenticate the incoming data point. AuthenticatorID component.ID `mapstructure:"authenticator"` }
Authentication defines the auth settings for the receiver.
func NewDefaultAuthentication ¶ added in v0.99.0
func NewDefaultAuthentication() *Authentication
NewDefaultAuthentication returns a default authentication configuration.
func (Authentication) GetClientAuthenticator ¶
func (a Authentication) GetClientAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (auth.Client, error)
GetClientAuthenticator attempts to select the appropriate auth.Client from the list of extensions, based on the component id of the extension. If an authenticator is not found, an error is returned. This should be only used by HTTP clients.
func (Authentication) GetClientAuthenticatorContext
deprecated
added in
v0.103.0
func (a Authentication) GetClientAuthenticatorContext(ctx context.Context, extensions map[component.ID]component.Component) (auth.Client, error)
GetClientAuthenticatorContext attempts to select the appropriate auth.Client from the list of extensions, based on the component id of the extension. If an authenticator is not found, an error is returned. This should be only used by HTTP clients.
Deprecated: [v0.105.0] Use GetClientAuthenticatorContext instead.
func (Authentication) GetServerAuthenticator ¶
func (a Authentication) GetServerAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (auth.Server, error)
GetServerAuthenticator attempts to select the appropriate auth.Server from the list of extensions, based on the requested extension name. If an authenticator is not found, an error is returned.
func (Authentication) GetServerAuthenticatorContext
deprecated
added in
v0.103.0
func (a Authentication) GetServerAuthenticatorContext(ctx context.Context, extensions map[component.ID]component.Component) (auth.Server, error)
GetServerAuthenticatorContext attempts to select the appropriate auth.Server from the list of extensions, based on the requested extension name. If an authenticator is not found, an error is returned.
Deprecated: [v0.105.0] Use GetServerAuthenticator instead.