Implement basic user authentication session management.
Authentication needs to be compatible with the password hash and salt stored from the original aurweb PHP implementation.
To complete this task, you must:
- Maintain a user member of request: the request session's associated User object.
- May want to use a stable library for this feature; look into more
starlette
andfastapi
middlewares.
- May want to use a stable library for this feature; look into more
- Add login and logout methods to the User model
- Implement an
auth_required
decorator - Implement a
role_required
decorator
This could all be solved by a FastAPI user authentication library; this needs to be researched.
Edited by Kevin Morris