LeoVasanko
68dccc1378
OAuth2 OpenID Connect provider support, API and DB refactoring ( #3 )
...
Allows Paskia to authenticate the user to a client site.
- User friendly client registration flow on the admin app
- Redirect-based authentication flow (per spec)
- Backchannel logout both ways to keep sessions synchronized
- Groups integrated with Paskia's permission system
- Adds email, preferred username and telephone fields on user profile
- All new user basic info layout to show the new information, better looks
- API and DB structures redesigned
- Various unrelated fixes to theming and layout
2026-02-18 02:40:27 +00:00
LeoVasanko
c1f8020f6b
API cleanup, using msgspec structs rather than raw responses. Admin app cleanup, better breadcrumbs.
2026-02-13 20:09:41 +00:00
LeoVasanko
a944224027
Inline get_config, rewrite update_config, DB init Config and rp_id defaults changed.
2026-02-10 23:01:02 +00:00
LeoVasanko
aef0e0cb44
ResetToken.hash(phrase) added avoiding code duplication.
2026-02-10 22:56:49 +00:00
LeoVasanko
d41cffc03e
Remove remaining DB getter functions, inline at call site and add ResetToken.by_passphrase().
2026-02-10 22:48:31 +00:00
LeoVasanko
b0b36e88b1
CRUD store and delete on the DB classes directly.
2026-02-10 22:19:02 +00:00
LeoVasanko
c2ea01e6d9
Use strictly same now timestamp over a transaction, even for UUIDv7s generated.
2026-02-10 21:45:09 +00:00
LeoVasanko
8b6bdd0f9c
Calculate session expiry times in operations, using a common now timestamp for everything.
2026-02-10 21:35:56 +00:00
LeoVasanko
3ca784dc3c
Set last seen and increment visits during registration, not only on authentication.
2026-02-10 21:25:20 +00:00
LeoVasanko
632230d05c
Minor fixes to config handling.
2026-02-09 17:37:10 +00:00
LeoVasanko
fb71ea1220
Storing config on database to simplify reloads by CLI.
2026-02-09 17:00:40 +00:00
LeoVasanko
3469e6fa3f
ruff check
2026-02-05 19:21:03 +00:00
LeoVasanko
c3df6c318c
Change host normalization to remove port numbers - sessions are per host, cookies don't respect port numbers.
2026-02-05 19:04:40 +00:00
LeoVasanko
af5a48f565
API/DB cleanup for flat URLs that don't include org where users etc. are referred to. Implement user deletion in admin app and API, UI improvement. Reset token DB factory function revised to create passphrase and key internally. Removed unneeded functions and args, using update_user_role instead of a separate deleted _in_organization function.
2026-02-05 13:57:07 +00:00
LeoVasanko
1800dc12ae
Light/dark selection in user profile, if set this is preferred on the whole system, together with app overrides (the first one on the URL wins).
2026-01-30 23:31:06 +00:00
LeoVasanko
e88cc004dd
Implement versioning in metadata, outside of the DB itself. Cleanup to migration handling and changes. Implement new migration step using msgspec normalization.
2026-01-28 20:21:09 +00:00
LeoVasanko
c1b0aab296
Cleanup
2026-01-28 19:17:24 +00:00
LeoVasanko
ce300ebdaf
API to use msgspec structs as well.
2026-01-28 18:31:45 +00:00
LeoVasanko
7329223784
Implement full ORM. Various other cleanup.
2026-01-28 17:19:56 +00:00
LeoVasanko
c8d659b5ca
Move get_session_context to DB.session_ctx().
2026-01-28 14:52:18 +00:00
LeoVasanko
d3d5f5a3c8
Remove get_session_context setting of host (now read only op as expected). Make session host, ip and user_agent always set (the ua potentially empty string).
2026-01-28 02:14:34 +00:00
LeoVasanko
b08cca754f
Remove Org.created_at to maintain compatibility with old versions (the field was not being used).
2026-01-28 01:31:35 +00:00
LeoVasanko
aa58f08bc5
Hardened PATCH handling (only allow updating select fields). Hardened DB transactions, rollback.
2026-01-28 01:13:05 +00:00
LeoVasanko
ddd70e6130
Cleaner typing to avoid some checking errors.
2026-01-27 22:04:14 +00:00
LeoVasanko
e8247a2c7f
Remove most remaining DB getters. Add ws auth chat helper function to avoid repetition, along with the existing register chat in wschat.py.
2026-01-27 20:01:17 +00:00
LeoVasanko
7530d7a710
DB cleanup continued: Made the working copy data public in DB class.
2026-01-27 18:02:16 +00:00
LeoVasanko
f0d1b86d6b
Database cleanup continues, build functions replaced by post init. Simplified some APIs.
2026-01-27 16:53:13 +00:00
LeoVasanko
86966526c4
Finalize database API class merge.
2026-01-27 03:00:18 +00:00
LeoVasanko
3196aa7688
Refactor API to match database, no _uuid postfixes.
2026-01-27 02:32:46 +00:00
LeoVasanko
9bdca1f43a
Finish the database key-in-object refactoring.
2026-01-27 02:11:09 +00:00
LeoVasanko
0f29544bdb
Database cleanup, better UUID passing and construction (User model).
2026-01-27 01:25:52 +00:00
LeoVasanko
7e568dbd10
Refactor validate endpoint to return session context, leaving user-info only for extra profile data. Completely separate token-info for reset tokens. Simplified by reusing same data structures in various places and mandating fields to have values not needing fallbacks. Implemented consistent AccessDenied view in profile and admin apps.
2026-01-26 19:40:48 +00:00
LeoVasanko
aae33e60ce
Fix errors where permission scopes were still expected for indexing.
2026-01-24 00:58:18 +00:00
LeoVasanko
a9ef20969e
Refer permissions by UUID rather than scope.
2026-01-24 00:06:08 +00:00
LeoVasanko
2ec6314264
Simplify session and reset token formats; removes the token utility functions entirely.
2026-01-23 20:53:03 +00:00
LeoVasanko
0f857ffb78
Cleanup, add database versioning.
2026-01-23 19:22:23 +00:00
LeoVasanko
b7ebe68665
Refactor to use UUID and bytes rather than str keys in msgspec structs because the module can automatically convert these.
2026-01-23 18:47:56 +00:00
LeoVasanko
f9d23a196c
Database refactor to separate modules.
2026-01-23 18:27:12 +00:00