basicauth

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package basicauth is an authentication plugin that uses basic auth.

Index

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 (*Plugin) Close

func (p *Plugin) Close(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

func (*Plugin) Configure

func (p *Plugin) Configure(ctx context.Context, req *v1.PluginConfiguration) (*emptypb.Empty, error)

func (*Plugin) GetInfo

func (p *Plugin) GetInfo(context.Context, *emptypb.Empty) (*v1.PluginInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL