authz

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 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 string, addrs []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