registerpolicy

package
v1.14.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MethodEmail  = authmethod.Email
	MethodMobile = authmethod.Mobile
	MethodDevice = authmethod.Device
)

Variables

This section is empty.

Functions

func EnsureMethodEnabled

func EnsureMethodEnabled(ctx context.Context, svcCtx *svc.ServiceContext, method string) error

EnsureMethodEnabled rejects direct calls to authentication methods disabled by the administrator. OAuth methods are loaded from the auth_method table.

func EnsureRegistrationOpen

func EnsureRegistrationOpen(ctx context.Context, svcCtx *svc.ServiceContext, method string) error

EnsureRegistrationOpen applies policies shared by every new-account path.

func TakeIPPermit

func TakeIPPermit(ctx context.Context, svcCtx *svc.ServiceContext, ip string) error

TakeIPPermit atomically reserves one registration from the configured IP quota. The duration is configured in minutes.

func VerifyHuman

func VerifyHuman(ctx context.Context, svcCtx *svc.ServiceContext, token, ip string) error

VerifyHuman enforces the configured registration Turnstile challenge.

Types

This section is empty.

Jump to

Keyboard shortcuts

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