Versions in this module Expand all Collapse all v1 v1.0.0 Mar 21, 2026 Changes in this version + func CookieFromRecorder(w *httptest.ResponseRecorder, name string) *http.Cookie + func NewNoopEventBus() *internaltests.MockEventBus + func NewPluginConfig() *types.TOTPPluginConfig + type MockTOTPRepo struct + func (m *MockTOTPRepo) CompareAndSwapBackupCodes(ctx context.Context, userID, expected, next string) (bool, error) + func (m *MockTOTPRepo) Create(ctx context.Context, userID, secret, backupCodes string) (*types.TOTPRecord, error) + func (m *MockTOTPRepo) CreateTrustedDevice(ctx context.Context, userID, token, userAgent string, expiresAt time.Time) (*types.TrustedDevice, error) + func (m *MockTOTPRepo) DeleteByUserID(ctx context.Context, userID string) error + func (m *MockTOTPRepo) DeleteTrustedDevicesByUserID(ctx context.Context, userID string) error + func (m *MockTOTPRepo) GetByUserID(ctx context.Context, userID string) (*types.TOTPRecord, error) + func (m *MockTOTPRepo) SetEnabled(ctx context.Context, userID string, enabled bool) error + func (m *MockTOTPRepo) UpdateBackupCodes(ctx context.Context, userID, backupCodes string) error