authentication rework #3

Merged
ninjdai merged 7 commits from feat/auth_rework into upcoming 2026-02-11 09:10:30 +01:00
Owner

This PR reworks the authentication system to lay the groundwork for session management (including allowing disconnecting other connected devices), and slightly better security by reducing the token lifespan to only 7 days and allowing them to be refreshed.

This system makes sessions differentiable from each other using a unique UUID for each. With this, only users who connected using username+password are able to share tokens to allow connection using QR codes.

Features :

  • POST /auth/refresh, which returns a new token linked to the same session with a refreshed 7 days expiry time
  • POST /auth/share, which is usable only by users who connected via username+password or that were given the auth_share permission, that returns a token to a new session with either the specified permissions or default permissions
  • GET /auth/perms, which returns your permissions
  • Permission System
This PR reworks the authentication system to lay the groundwork for session management (including allowing disconnecting other connected devices), and slightly better security by **reducing the token lifespan to only 7 days** and allowing them to be refreshed. This system makes sessions differentiable from each other using a unique UUID for each. With this, only users who connected using username+password are able to share tokens to allow connection using QR codes. Features : - [x] POST /auth/refresh, which returns a new token linked to the same session with a refreshed 7 days expiry time - [x] POST /auth/share, which is usable only by users who connected via username+password or that were given the auth_share permission, that returns a token to a new session with either the specified permissions or default permissions - [x] GET /auth/perms, which returns your permissions - [x] Permission System
initial authentication rework
Some checks failed
/ test (push) Failing after 3m50s
/ test (pull_request) Failing after 3m18s
b9c811f4e4
remove customizable token duration
Some checks failed
/ test (push) Failing after 3m11s
/ test (pull_request) Failing after 3m41s
66de001946
fix tests
All checks were successful
/ test (push) Successful in 4m9s
/ test (pull_request) Successful in 4m52s
9c3e2ea94a
feat(tests): /auth/refresh test
All checks were successful
/ test (push) Successful in 4m2s
/ test (pull_request) Successful in 4m49s
9d6b020c8e
add permission system and remove session system
All checks were successful
/ test (push) Successful in 4m53s
/ test (pull_request) Successful in 4m58s
1380c29b2f
feat: permissions field in share
All checks were successful
/ test (push) Successful in 4m40s
/ test (pull_request) Successful in 4m42s
9212ea2951
ninjdai changed title from WIP: authentication rework to authentication rework 2026-02-10 23:41:41 +01:00
feat: get self perms endpoint
All checks were successful
/ test (push) Successful in 4m25s
/ test (pull_request) Successful in 5m10s
93ba4c4fad
ninjdai merged commit 7ae4a83e24 into upcoming 2026-02-11 09:10:30 +01:00
ninjdai deleted branch feat/auth_rework 2026-02-11 09:10:31 +01:00
ninjdai referenced this pull request from a commit 2026-02-11 09:10:31 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
UEAuvergne/Alexandria!3
No description provided.