Documentation
¶
Overview ¶
Package auth defines the Authenticator interface for verifying client identities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface {
// Authenticate validates the username and password. It returns the user
// identifier id and whether authentication succeeded.
// The id can be used for subsequent authorization and audit trails.
Authenticate(ctx context.Context, user, password string, opts ...Option) (id string, ok bool)
}
Authenticator is the user authentication interface. In proxy scenarios, authentication happens after the client connection is established and before any request is processed. Only authenticated connections are allowed to proceed.
type Option ¶
type Option func(opts *Options)
Option is a functional option for configuring Options.
func WithService ¶ added in v0.6.1
WithService sets the service name.