ident

package
v2.19.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const MaxPasswordLength = 72

Variables

View Source
var (
	// ErrMalformedAuth occurs when authorization content is malformed
	ErrMalformedAuth = errors.New("malformed authorization content")

	// ErrUnavailableService occurs when service is unavailable
	ErrUnavailableService = errors.New("unavailable ident service")

	// ErrInvalidCredentials occurs when credentials failed
	ErrInvalidCredentials = errors.New("invalid credentials")

	// ErrTooLongPassword occurs when password is too long
	ErrTooLongPassword = errors.New("password is too long, limit is 72 bytes")
)

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// IsMatching checks if header content match provider
	IsMatching(string) bool

	// GetUser returns User found in content header
	GetUser(context.Context, string) (model.User, error)

	// OnError handles HTTP request when login fails
	OnError(http.ResponseWriter, *http.Request, error)
}

Provider provides methods for dealing with identification

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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