authz

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NormalizeFuncs = map[string]func(string) (string, error){
	"precis_casefold_email": address.PRECISFold,
	"precis_casefold":       precis.UsernameCaseMapped.CompareKey,
	"precis_email":          address.PRECIS,
	"precis":                precis.UsernameCasePreserved.CompareKey,
	"casefold": func(s string) (string, error) {
		return strings.ToLower(s), nil
	},
	"noop": func(s string) (string, error) {
		return s, nil
	},
}

NormalizeFuncs defines configurable normalization functions to be used in authentication and authorization routines.

Functions

func AuthorizeEmailUse

func AuthorizeEmailUse(ctx context.Context, username, addr string, mapping module.Table) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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