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 ColIsAnonymous + const DefaultName + const EndpointDelete + const EndpointSignIn + const PluginName + var ErrAlreadyAnonymous = auth.NewError("anonymous.already", http.StatusConflict, "You already have a guest session.") + var ErrNotAnonymous = auth.NewError("anonymous.not_anonymous", http.StatusForbidden, ...) + var IsAnonymous = sqlb.Col[bool](auth.TableUser, ColIsAnonymous) + func Bindings(c *AnonymousColumns) []sqlb.Binding + type AnonymousColumns struct + IsAnonymous bool + type LinkFunc func(ctx context.Context, tx sqlb.DBTX, guest, user auth.User) error + type Option func(*Plugin) + func KeepUsers() Option + func OnLink(fn LinkFunc) Option + func SweepStale() Option + func WithName(fn func() string) Option + func WithSignInLimit(n int, window time.Duration) Option + type Plugin struct + func New(opts ...Option) *Plugin + func (p *Plugin) Columns() []auth.ColumnExtension + func (p *Plugin) DataHooks() auth.DataHooks + func (p *Plugin) Delete(ctx context.Context) error + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) IsAnonymous(ctx context.Context, userID string) (bool, error) + func (p *Plugin) Name() string + func (p *Plugin) Operations() []auth.Operation + func (p *Plugin) OptionErr() error + func (p *Plugin) RateLimits() []auth.RateRule + func (p *Plugin) SignIn(ctx context.Context) (SignInResult, error) + func (p *Plugin) SignsIn() bool + func (p *Plugin) Sweep(ctx context.Context, cutoff time.Time) (int64, error) + func (p *Plugin) Validate(*auth.Config) error + type SignInRequest struct + Remember *bool + type SignInResult struct + Token auth.Token + User auth.UserView