Documentation ¶
Overview ¶
Package basicauth is an authentication plugin that uses basic auth.
Index ¶
- func NewCreds(username, password string) grpc.DialOption
- type Config
- type Plugin
- func (p *Plugin) Authenticate(ctx context.Context, req *v1.AuthenticationRequest) (*v1.AuthenticationResponse, error)
- func (p *Plugin) Close(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)
- func (p *Plugin) Configure(ctx context.Context, req *v1.PluginConfiguration) (*emptypb.Empty, error)
- func (p *Plugin) GetInfo(context.Context, *emptypb.Empty) (*v1.PluginInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreds ¶
func NewCreds(username, password string) grpc.DialOption
NewCreds returns a DialOption that sets the basic auth credentials.
Types ¶
type Config ¶
type Config struct { // HTPasswdFile is the path to an htpasswd file to use to verify client // credentials. HTPasswdFile string `mapstructure:"htpasswd-file"` }
Config is the configuration for the basic auth plugin.
type Plugin ¶
type Plugin struct { v1.UnimplementedPluginServer v1.UnimplementedAuthPluginServer // contains filtered or unexported fields }
Plugin is the basicauth plugin.
func (*Plugin) Authenticate ¶
func (p *Plugin) Authenticate(ctx context.Context, req *v1.AuthenticationRequest) (*v1.AuthenticationResponse, error)
Click to show internal directories.
Click to hide internal directories.