api_auth_common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VerificationCodePattern = regexp.MustCompile(`^[0-9]{6}$`)

Functions

func EnumStringSchema

func EnumStringSchema(values ...string) map[string]interface{}

func HasOnlyKeys

func HasOnlyKeys(input map[string]interface{}, allowed ...string) bool

func InputObject

func InputObject(input interface{}) (map[string]interface{}, bool)

func InputSchema

func InputSchema(
	properties map[string]interface{},
	required ...string,
) map[string]interface{}

func LogInternalFailure

func LogInternalFailure(operation string)

func NewRandomToken

func NewRandomToken() (string, error)

func NewVerificationCode

func NewVerificationCode() (string, error)

func NormalizeEmail

func NormalizeEmail(value string) (string, error)

func NormalizePhone

func NormalizePhone(value string) (string, error)

func PhoneSchema

func PhoneSchema() map[string]interface{}

func RequiredRawString

func RequiredRawString(input map[string]interface{}, name string) (string, bool)

func RequiredString

func RequiredString(input map[string]interface{}, name string) (string, bool)

func SecureStringEqual

func SecureStringEqual(left, right string) bool

func StringSchema

func StringSchema(
	format string,
	minLength int,
	maxLength int,
) map[string]interface{}

func TokenHash

func TokenHash(token string) string

func TokenInputSchema

func TokenInputSchema(name string) map[string]interface{}

func VerificationCodeHash

func VerificationCodeHash(secret, recipient, code string) string

func VerificationCodeSchema

func VerificationCodeSchema() map[string]interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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