basic

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AccountKey = "user"

AccountKey is the cookie name for user credential in basic auth.

View Source
const (
	Basic = "Basic"
)
View Source
const Device = "device"

Device is the cookie name for user credential in basic auth.

View Source
const DeviceIDHeader = "X-Device-ID"

DeviceIDHeader holds Device Authentication.

Variables

View Source
var ErrDevicePassVerificationFailed = errors.New("device pass verification failed")
View Source
var ErrNoCredentialsInHeader = errors.New("no basic auth credentials in header")

Functions

func AuthWithShare

func AuthWithShare(accounts service.Accounts, devices service.Devices) echo.MiddlewareFunc

AuthWithShare returns a Basic HTTP Authorization Handler. It takes as argument a map[string]string where the key is the username and the value is the password.

func CredentialsFromAuthorizationHeader added in v0.2.0

func CredentialsFromAuthorizationHeader(ctx echo.Context) (string, string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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