regstack 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {regstack-0.2.3 → regstack-0.2.4}/CHANGELOG.md +19 -0
- {regstack-0.2.3 → regstack-0.2.4}/PKG-INFO +1 -1
- {regstack-0.2.3 → regstack-0.2.4}/docs/architecture.md +0 -1
- {regstack-0.2.3 → regstack-0.2.4}/docs/changelog.md +33 -0
- {regstack-0.2.3 → regstack-0.2.4}/pyproject.toml +1 -1
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/app.py +0 -8
- regstack-0.2.4/src/regstack/backends/mongo/repositories/__init__.py +13 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/mfa_code_repo.py +0 -3
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/pending_repo.py +0 -3
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/user_repo.py +0 -3
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/models/_objectid.py +0 -8
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/models/login_attempt.py +2 -2
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/models/mfa_code.py +2 -2
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/models/pending_registration.py +2 -2
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/models/user.py +2 -2
- regstack-0.2.4/src/regstack/version.py +1 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_mfa_code_repo.py +2 -1
- {regstack-0.2.3 → regstack-0.2.4}/uv.lock +1 -1
- regstack-0.2.3/src/regstack/backends/mongo/repositories/__init__.py +0 -27
- regstack-0.2.3/src/regstack/version.py +0 -1
- {regstack-0.2.3 → regstack-0.2.4}/.github/workflows/publish.yml +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/.github/workflows/test.yml +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/.gitignore +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/.python-version +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/.readthedocs.yaml +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/CLAUDE.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/LICENSE +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/NOTICE +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/README.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/SECURITY.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/_static/.gitkeep +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/_templates/.gitkeep +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/api.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/cli.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/conf.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/configuration.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/embedding.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/index.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/quickstart.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/security.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/docs/theming.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/_common/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/_common/app.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/mongo/README.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/mongo/branding/theme.css +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/mongo/main.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/mongo/regstack.toml +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/postgres/README.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/postgres/main.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/postgres/regstack.toml +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/sqlite/README.md +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/sqlite/main.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/examples/sqlite/regstack.toml +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/regstack.toml.example +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/clock.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/dependencies.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/jwt.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/lockout.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/mfa.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/password.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/auth/tokens.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/base.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/factory.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/backend.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/client.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/indexes.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/blacklist_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/login_attempt_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/protocols.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/backend.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/migrations/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/migrations/env.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/migrations/script.py.mako +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/migrations/versions/0001_initial_schema.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/blacklist_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/login_attempt_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/mfa_code_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/pending_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/user_repo.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/schema.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/types.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/__main__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/_runtime.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/admin.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/doctor.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/init.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/cli/migrate.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/config/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/config/loader.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/config/schema.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/config/secrets.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/base.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/composer.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/console.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/factory.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/ses.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/smtp.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/email_change.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/email_change.subject.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/email_change.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/password_reset.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/password_reset.subject.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/password_reset.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/sms_login_mfa.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/sms_phone_setup.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/verification.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/verification.subject.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/email/templates/verification.txt +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/hooks/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/hooks/events.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/models/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/_schemas.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/account.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/admin.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/login.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/logout.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/password.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/phone.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/register.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/routers/verify.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/sms/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/sms/base.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/sms/factory.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/sms/null.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/sms/sns.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/sms/twilio.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/pages.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/static/css/core.css +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/static/css/theme.css +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/static/js/regstack.js +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/email_change_confirm.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/forgot.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/login.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/me.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/mfa_confirm.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/register.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/reset.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/auth/verify.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/src/regstack/ui/templates/base.html +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tasks.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/conftest.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_account_management.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_admin_router.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_happy_path.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_indexes.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_login_lockout.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_mfa.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_password_reset.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_sql_migrations.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_ui_router.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/integration/test_verification.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/__init__.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_base_install_imports.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_cli.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_config_loader.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_jwt.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_lockout.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_mail_composer.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_password.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_ses_backend.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_sms.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_smtp_backend.py +0 -0
- {regstack-0.2.3 → regstack-0.2.4}/tests/unit/test_ui_env.py +0 -0
|
@@ -5,6 +5,25 @@ authoritative copy lives at
|
|
|
5
5
|
[`docs/changelog.md`](docs/changelog.md) and is rendered into the
|
|
6
6
|
Sphinx docs.
|
|
7
7
|
|
|
8
|
+
## 0.2.4 — 2026-04-28
|
|
9
|
+
|
|
10
|
+
**Breaking** — back-compat shims removed:
|
|
11
|
+
|
|
12
|
+
- `RegStack.install_indexes()` (alias for `install_schema()`).
|
|
13
|
+
- `ObjectIdStr` alias for `IdStr` in `regstack.models._objectid`.
|
|
14
|
+
- Re-exports of `UserAlreadyExistsError`,
|
|
15
|
+
`PendingAlreadyExistsError`, `MfaVerifyOutcome`, and
|
|
16
|
+
`MfaVerifyResult` from `regstack.backends.mongo.repositories.*`.
|
|
17
|
+
Their canonical home is `regstack.backends.protocols`.
|
|
18
|
+
|
|
19
|
+
If you import any of these from the old paths, switch to:
|
|
20
|
+
- `RegStack.install_schema()`
|
|
21
|
+
- `from regstack.models._objectid import IdStr`
|
|
22
|
+
- `from regstack.backends.protocols import UserAlreadyExistsError`
|
|
23
|
+
(and friends).
|
|
24
|
+
|
|
25
|
+
The internal mongo `install_indexes(db, config)` function is unchanged.
|
|
26
|
+
|
|
8
27
|
## 0.2.3 — 2026-04-28
|
|
9
28
|
|
|
10
29
|
Docs-only release. Restructured the API reference around the current
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: regstack
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Embeddable user registration, login, and account management for FastAPI apps. SQLite / Postgres / MongoDB.
|
|
5
5
|
Project-URL: Homepage, https://github.com/jdrumgoole/regstack
|
|
6
6
|
Project-URL: Repository, https://github.com/jdrumgoole/regstack
|
|
@@ -72,7 +72,6 @@ The façade exposes:
|
|
|
72
72
|
- `backend` — the active `regstack.backends.base.Backend`.
|
|
73
73
|
- `install_schema()` — install indexes (Mongo) or run
|
|
74
74
|
[Alembic](https://alembic.sqlalchemy.org/) migrations (SQL).
|
|
75
|
-
`install_indexes()` is kept as a back-compat alias.
|
|
76
75
|
- `aclose()` — tear down the backend's connection pool.
|
|
77
76
|
- `bootstrap_admin(email, password)`,
|
|
78
77
|
`add_template_dir(path)`, `set_email_backend(...)`,
|
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project are documented here. Versions follow
|
|
4
4
|
[Semantic Versioning](https://semver.org/) once `1.0.0` ships.
|
|
5
5
|
|
|
6
|
+
## 0.2.4 — 2026-04-28
|
|
7
|
+
|
|
8
|
+
**Breaking** — every back-compat shim left over from the
|
|
9
|
+
multi-backend refactor has been removed.
|
|
10
|
+
|
|
11
|
+
### Removed
|
|
12
|
+
|
|
13
|
+
- `RegStack.install_indexes()` — the 0.1.x alias for
|
|
14
|
+
`install_schema()`. Call `install_schema()`.
|
|
15
|
+
- `ObjectIdStr` alias for `IdStr` in `regstack.models._objectid`.
|
|
16
|
+
Import `IdStr` directly.
|
|
17
|
+
- `__all__`-based re-exports of `UserAlreadyExistsError`,
|
|
18
|
+
`PendingAlreadyExistsError`, `MfaVerifyOutcome`, and
|
|
19
|
+
`MfaVerifyResult` from `regstack.backends.mongo.repositories.*` and
|
|
20
|
+
the package `__init__`. Their canonical home is
|
|
21
|
+
`regstack.backends.protocols`; that's where every consumer in the
|
|
22
|
+
package itself already imports them.
|
|
23
|
+
|
|
24
|
+
### Migration
|
|
25
|
+
|
|
26
|
+
| Old | New |
|
|
27
|
+
|----------------------------------------------------------------------------------|----------------------------------------------------------------|
|
|
28
|
+
| `await regstack.install_indexes()` | `await regstack.install_schema()` |
|
|
29
|
+
| `from regstack.models._objectid import ObjectIdStr` | `from regstack.models._objectid import IdStr` |
|
|
30
|
+
| `from regstack.backends.mongo.repositories.user_repo import UserAlreadyExistsError` | `from regstack.backends.protocols import UserAlreadyExistsError` |
|
|
31
|
+
| `from regstack.backends.mongo.repositories.pending_repo import PendingAlreadyExistsError` | `from regstack.backends.protocols import PendingAlreadyExistsError` |
|
|
32
|
+
| `from regstack.backends.mongo.repositories.mfa_code_repo import MfaVerifyOutcome, MfaVerifyResult` | `from regstack.backends.protocols import MfaVerifyOutcome, MfaVerifyResult` |
|
|
33
|
+
|
|
34
|
+
The internal Mongo helper
|
|
35
|
+
`regstack.backends.mongo.indexes.install_indexes(db, config)` is
|
|
36
|
+
unchanged — that's the function `MongoBackend.install_schema` calls
|
|
37
|
+
to actually create the indexes.
|
|
38
|
+
|
|
6
39
|
## 0.2.3 — 2026-04-28
|
|
7
40
|
|
|
8
41
|
**Docs-only release.** API reference rewritten around the current
|
|
@@ -213,14 +213,6 @@ class RegStack:
|
|
|
213
213
|
"""
|
|
214
214
|
await self.backend.install_schema()
|
|
215
215
|
|
|
216
|
-
async def install_indexes(self) -> None:
|
|
217
|
-
"""Backwards-compatible alias for :meth:`install_schema`.
|
|
218
|
-
|
|
219
|
-
Kept for the 0.1.x ``install_indexes()`` name. New callers
|
|
220
|
-
should use :meth:`install_schema`.
|
|
221
|
-
"""
|
|
222
|
-
await self.install_schema()
|
|
223
|
-
|
|
224
216
|
async def aclose(self) -> None:
|
|
225
217
|
"""Tear down the backend's connection pool.
|
|
226
218
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from regstack.backends.mongo.repositories.blacklist_repo import BlacklistRepo
|
|
2
|
+
from regstack.backends.mongo.repositories.login_attempt_repo import LoginAttemptRepo
|
|
3
|
+
from regstack.backends.mongo.repositories.mfa_code_repo import MfaCodeRepo
|
|
4
|
+
from regstack.backends.mongo.repositories.pending_repo import PendingRepo
|
|
5
|
+
from regstack.backends.mongo.repositories.user_repo import UserRepo
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"BlacklistRepo",
|
|
9
|
+
"LoginAttemptRepo",
|
|
10
|
+
"MfaCodeRepo",
|
|
11
|
+
"PendingRepo",
|
|
12
|
+
"UserRepo",
|
|
13
|
+
]
|
|
@@ -13,9 +13,6 @@ if TYPE_CHECKING:
|
|
|
13
13
|
from regstack.auth.clock import Clock
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
__all__ = ["MfaCodeRepo", "MfaVerifyOutcome", "MfaVerifyResult"]
|
|
17
|
-
|
|
18
|
-
|
|
19
16
|
class MfaCodeRepo:
|
|
20
17
|
def __init__(self, db: AsyncDatabase, collection_name: str, *, clock: Clock) -> None:
|
|
21
18
|
self._collection = db[collection_name]
|
|
@@ -13,9 +13,6 @@ if TYPE_CHECKING:
|
|
|
13
13
|
from pymongo.asynchronous.database import AsyncDatabase
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
__all__ = ["PendingAlreadyExistsError", "PendingRepo"]
|
|
17
|
-
|
|
18
|
-
|
|
19
16
|
class PendingRepo:
|
|
20
17
|
def __init__(self, db: AsyncDatabase, collection_name: str) -> None:
|
|
21
18
|
self._collection = db[collection_name]
|
|
@@ -14,9 +14,6 @@ if TYPE_CHECKING:
|
|
|
14
14
|
from pymongo.asynchronous.database import AsyncDatabase
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
__all__ = ["UserAlreadyExistsError", "UserRepo"]
|
|
18
|
-
|
|
19
|
-
|
|
20
17
|
def _bulk_revoke_cutoff(now: datetime) -> datetime:
|
|
21
18
|
"""The cutoff timestamp recorded on the user document. Stored at full
|
|
22
19
|
microsecond precision; the JWT ``iat`` claim is also emitted as a float
|
|
@@ -7,10 +7,6 @@ the backend:
|
|
|
7
7
|
- SQL backends use UUID4 hex (32-char).
|
|
8
8
|
- Hosts with their own ID strategy can substitute anything else as long
|
|
9
9
|
as it round-trips as a string.
|
|
10
|
-
|
|
11
|
-
Historically this was named ``ObjectIdStr`` and validated 24-char hex
|
|
12
|
-
only. The rename and relaxed contract landed when the SQL backends
|
|
13
|
-
arrived; the old name is kept as an alias for any external imports.
|
|
14
10
|
"""
|
|
15
11
|
|
|
16
12
|
from __future__ import annotations
|
|
@@ -49,7 +45,3 @@ class _IdValidator:
|
|
|
49
45
|
|
|
50
46
|
|
|
51
47
|
IdStr = Annotated[str, _IdValidator]
|
|
52
|
-
|
|
53
|
-
# Back-compat alias — the contract is now "any non-empty string", so
|
|
54
|
-
# anyone reaching for ObjectIdStr keeps the same surface area.
|
|
55
|
-
ObjectIdStr = IdStr
|
|
@@ -5,7 +5,7 @@ from typing import Any
|
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, ConfigDict, EmailStr, Field
|
|
7
7
|
|
|
8
|
-
from regstack.models._objectid import
|
|
8
|
+
from regstack.models._objectid import IdStr
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def _utcnow() -> datetime:
|
|
@@ -19,7 +19,7 @@ class LoginAttempt(BaseModel):
|
|
|
19
19
|
|
|
20
20
|
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
21
21
|
|
|
22
|
-
id:
|
|
22
|
+
id: IdStr | None = Field(default=None, alias="_id")
|
|
23
23
|
email: EmailStr
|
|
24
24
|
when: datetime = Field(default_factory=_utcnow)
|
|
25
25
|
ip: str | None = None
|
|
@@ -5,7 +5,7 @@ from typing import Any, Literal
|
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, ConfigDict, Field
|
|
7
7
|
|
|
8
|
-
from regstack.models._objectid import
|
|
8
|
+
from regstack.models._objectid import IdStr
|
|
9
9
|
|
|
10
10
|
MfaKind = Literal["phone_setup", "login_mfa"]
|
|
11
11
|
|
|
@@ -24,7 +24,7 @@ class MfaCode(BaseModel):
|
|
|
24
24
|
|
|
25
25
|
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
26
26
|
|
|
27
|
-
id:
|
|
27
|
+
id: IdStr | None = Field(default=None, alias="_id")
|
|
28
28
|
user_id: str
|
|
29
29
|
kind: MfaKind
|
|
30
30
|
code_hash: str
|
|
@@ -5,7 +5,7 @@ from typing import Any
|
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, ConfigDict, EmailStr, Field
|
|
7
7
|
|
|
8
|
-
from regstack.models._objectid import
|
|
8
|
+
from regstack.models._objectid import IdStr
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def _utcnow() -> datetime:
|
|
@@ -23,7 +23,7 @@ class PendingRegistration(BaseModel):
|
|
|
23
23
|
|
|
24
24
|
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
25
25
|
|
|
26
|
-
id:
|
|
26
|
+
id: IdStr | None = Field(default=None, alias="_id")
|
|
27
27
|
email: EmailStr
|
|
28
28
|
hashed_password: str
|
|
29
29
|
full_name: str | None = None
|
|
@@ -5,7 +5,7 @@ from typing import Annotated, Any
|
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, ConfigDict, EmailStr, Field, field_validator
|
|
7
7
|
|
|
8
|
-
from regstack.models._objectid import
|
|
8
|
+
from regstack.models._objectid import IdStr
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def _utcnow() -> datetime:
|
|
@@ -25,7 +25,7 @@ class BaseUser(BaseModel):
|
|
|
25
25
|
|
|
26
26
|
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
27
27
|
|
|
28
|
-
id:
|
|
28
|
+
id: IdStr | None = Field(default=None, alias="_id")
|
|
29
29
|
email: EmailStr
|
|
30
30
|
hashed_password: str
|
|
31
31
|
is_active: bool = True
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.4"
|
|
@@ -7,7 +7,8 @@ import pytest_asyncio
|
|
|
7
7
|
|
|
8
8
|
from regstack.auth.clock import FrozenClock
|
|
9
9
|
from regstack.auth.tokens import hash_token
|
|
10
|
-
from regstack.backends.mongo.repositories.mfa_code_repo import MfaCodeRepo
|
|
10
|
+
from regstack.backends.mongo.repositories.mfa_code_repo import MfaCodeRepo
|
|
11
|
+
from regstack.backends.protocols import MfaVerifyOutcome
|
|
11
12
|
from regstack.models.mfa_code import MfaCode
|
|
12
13
|
|
|
13
14
|
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
from regstack.backends.mongo.repositories.blacklist_repo import BlacklistRepo
|
|
2
|
-
from regstack.backends.mongo.repositories.login_attempt_repo import LoginAttemptRepo
|
|
3
|
-
from regstack.backends.mongo.repositories.mfa_code_repo import (
|
|
4
|
-
MfaCodeRepo,
|
|
5
|
-
MfaVerifyOutcome,
|
|
6
|
-
MfaVerifyResult,
|
|
7
|
-
)
|
|
8
|
-
from regstack.backends.mongo.repositories.pending_repo import (
|
|
9
|
-
PendingAlreadyExistsError,
|
|
10
|
-
PendingRepo,
|
|
11
|
-
)
|
|
12
|
-
from regstack.backends.mongo.repositories.user_repo import (
|
|
13
|
-
UserAlreadyExistsError,
|
|
14
|
-
UserRepo,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
__all__ = [
|
|
18
|
-
"BlacklistRepo",
|
|
19
|
-
"LoginAttemptRepo",
|
|
20
|
-
"MfaCodeRepo",
|
|
21
|
-
"MfaVerifyOutcome",
|
|
22
|
-
"MfaVerifyResult",
|
|
23
|
-
"PendingAlreadyExistsError",
|
|
24
|
-
"PendingRepo",
|
|
25
|
-
"UserAlreadyExistsError",
|
|
26
|
-
"UserRepo",
|
|
27
|
-
]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/blacklist_repo.py
RENAMED
|
File without changes
|
{regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/mongo/repositories/login_attempt_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{regstack-0.2.3 → regstack-0.2.4}/src/regstack/backends/sql/repositories/login_attempt_repo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|