botmitigation

package
v0.1.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package botmitigation verifies bot-challenge tokens before auth flows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Metrics

func Metrics() (ok uint64, fail uint64)

Metrics returns the in-process bot-mitigation check counters.

Types

type InstrumentedVerifier

type InstrumentedVerifier struct {
	Name string
	Next Verifier
}

InstrumentedVerifier wraps a verifier and records Prometheus-style counters.

func (InstrumentedVerifier) Verify

func (v InstrumentedVerifier) Verify(ctx context.Context, token string) error

Verify delegates to the wrapped verifier and records the outcome.

type NoopVerifier

type NoopVerifier struct{}

func (NoopVerifier) Verify

type Verifier

type Verifier interface {
	Verify(ctx context.Context, token string) error
}

Jump to

Keyboard shortcuts

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