htpasswd

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidUser             = errors.New("user is invalid")
	ErrFailedToParseBasicAuth  = errors.New("the provided basic authentication credentials are invalid")
	ErrMetadataNotFound        = errors.New("metadata not found")
	ErrAuthHeaderNotFound      = errors.New("authorization header not found")
	ErrFailedToDecodeBasicAuth = errors.New("failed to decode authorization header")
	ErrAuthHeaderInvalidFormat = errors.New("invalid authorization header format")
	ErrInvalidPassword         = errors.New("password is invalid")
)

Functions

func CompareBasicAuth

func CompareBasicAuth(basicAuthCredential, user, password string) error

CompareBasicAuth compare basic auth with bcrypt algorithm.

func ExtractBasicAuthFromContext

func ExtractBasicAuthFromContext(ctx context.Context) (string, string, error)

ExtractBasicAuthFromContext extract basic auth from incoming context in grpc request.

func ParseHtpasswdAuth

func ParseHtpasswdAuth(basicAuthCredential string) (string, string, error)

ParseHtpasswdAuth parse htpasswd auth.

Types

This section is empty.

Jump to

Keyboard shortcuts

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