authmethod

package
v1.14.21 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Email  = "email"  //邮箱
	Mobile = "mobile" //手机
	Device = "device" //设备

)

Variables

View Source
var (
	ErrInvalidEmail       = errors.New("invalid email address")
	ErrEmailDomainDenied  = errors.New("email domain is not allowed")
	ErrEmailDomainListNil = errors.New("email domain allowlist is empty")
)

Functions

func CanonicalEmail added in v1.3.13

func CanonicalEmail(email string) string

func CanonicalIdentifier added in v1.3.13

func CanonicalIdentifier(authType, identifier string) string

func ValidateEmail added in v1.14.1

func ValidateEmail(email, domainList string, enforceDomain bool) (string, error)

ValidateEmail canonicalizes and validates an email address. When domain filtering is enabled, the address domain must match an allowlisted domain or one of its subdomains at a label boundary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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