Documentation
¶
Index ¶
- Constants
- func EnsureMethodEnabled(ctx context.Context, svcCtx *svc.ServiceContext, method string) error
- func EnsureRegistrationOpen(ctx context.Context, svcCtx *svc.ServiceContext, method string) error
- func TakeIPPermit(ctx context.Context, svcCtx *svc.ServiceContext, ip string) error
- func VerifyHuman(ctx context.Context, svcCtx *svc.ServiceContext, token, ip string) error
Constants ¶
View Source
const ( MethodEmail = authmethod.Email MethodMobile = authmethod.Mobile MethodDevice = authmethod.Device )
Variables ¶
This section is empty.
Functions ¶
func EnsureMethodEnabled ¶
EnsureMethodEnabled rejects direct calls to authentication methods disabled by the administrator. OAuth methods are loaded from the auth_method table.
func EnsureRegistrationOpen ¶
EnsureRegistrationOpen applies policies shared by every new-account path.
func TakeIPPermit ¶
TakeIPPermit atomically reserves one registration from the configured IP quota. The duration is configured in minutes.
func VerifyHuman ¶
VerifyHuman enforces the configured registration Turnstile challenge.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.