Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Oct 14, 2026 Changes in this version + const ChallengeMethod + const DefaultTTL + const EndpointGenerate + const EndpointVerify + const MaxVerifierLen + const MinVerifierLen + const PluginName + const PurposeHandoff + const SetOTTHeader + const VerifierBytes + var ErrBadTTL = errors.New("handoff: WithTTL needs a positive duration") + var ErrChallengeInvalid = auth.NewError("handoff.challenge_invalid", http.StatusBadRequest, ...) + var ErrVerifierInvalid = auth.NewError("handoff.verifier_invalid", http.StatusBadRequest, ...) + func ChallengeOf(verifier string) string + func NewSessionToken(ctx context.Context) (auth.Token, bool) + func NewVerifier() (verifier, challenge string, err error) + type GenerateRequest struct + Challenge string + type GenerateResult struct + ExpiresAt time.Time + Token string + type Option func(*Plugin) + func IssueOnNewSession() Option + func ServerOnly() Option + func WithGenerateLimit(n int, window time.Duration) Option + func WithTTL(d time.Duration) Option + func WithVerifyLimit(n int, window time.Duration) Option + type Plugin struct + func New(opts ...Option) *Plugin + func (p *Plugin) Generate(ctx context.Context) (GenerateResult, error) + func (p *Plugin) GenerateWith(ctx context.Context, in GenerateRequest) (GenerateResult, error) + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) Name() string + func (p *Plugin) OperationHooks() []auth.OperationHook + func (p *Plugin) Operations() []auth.Operation + func (p *Plugin) RateLimits() []auth.RateRule + func (p *Plugin) Validate(*auth.Config) error + func (p *Plugin) Verify(ctx context.Context, t auth.Token) (VerifyResult, error) + func (p *Plugin) VerifyWith(ctx context.Context, in VerifyRequest) (VerifyResult, error) + type VerifyRequest struct + Token auth.WireToken + Verifier string + func (r VerifyRequest) RateIdentifier() string + type VerifyResult struct + Token auth.Token + User auth.UserView