Versions in this module Expand all Collapse all v0 v0.2.0 Oct 25, 2026 v0.1.0 Oct 18, 2026 Changes in this version + type ClientInfo struct + DeviceID string + IPAddress string + UserAgent string + type Manager struct + func NewManager(options Options) (*Manager, error) + func (m *Manager) Create(ctx context.Context, principal authentication.Principal, client ClientInfo) (Session, string, error) + func (m *Manager) Revoke(ctx context.Context, id string) error + func (m *Manager) RevokePrincipal(ctx context.Context, principalID string) error + func (m *Manager) Rotate(ctx context.Context, id string, refresh string) (rotated Session, nextRefresh string, err error) + func (m *Manager) Validate(ctx context.Context, id string) (Session, error) + type MemoryRevocationStore struct + func NewMemoryRevocationStore() *MemoryRevocationStore + func (s *MemoryRevocationStore) IsPrincipalRevoked(ctx context.Context, id string) (bool, error) + func (s *MemoryRevocationStore) IsSessionRevoked(ctx context.Context, id string) (bool, error) + func (s *MemoryRevocationStore) RevokePrincipal(ctx context.Context, id string) error + func (s *MemoryRevocationStore) RevokeSession(ctx context.Context, id string) error + type MemoryStore struct + func NewMemoryStore() *MemoryStore + func (s *MemoryStore) CompareAndSwap(ctx context.Context, id string, expectedVersion uint64, fence uint64, ...) error + func (s *MemoryStore) Create(ctx context.Context, session Session) error + func (s *MemoryStore) Get(ctx context.Context, id string) (Session, error) + func (s *MemoryStore) ListByPrincipal(ctx context.Context, principalID string) ([]Session, error) + type Options struct + Clock func() time.Time + Coordinator coordination.Backend + Lifetime time.Duration + ManagerID string + Random io.Reader + Revocations RevocationStore + Store Store + type RevocationStore interface + IsPrincipalRevoked func(context.Context, string) (bool, error) + IsSessionRevoked func(context.Context, string) (bool, error) + RevokePrincipal func(context.Context, string) error + RevokeSession func(context.Context, string) error + type Session struct + Client ClientInfo + CreatedAt time.Time + ExpiresAt time.Time + ID string + LastSeenAt time.Time + Principal authentication.Principal + RefreshDigest [32]byte + Rotation uint64 + Version uint64 + type Store interface + CompareAndSwap func(context.Context, string, uint64, uint64, Session) error + Create func(context.Context, Session) error + Get func(context.Context, string) (Session, error) + ListByPrincipal func(context.Context, string) ([]Session, error)