Property | Value |
---|---|
Authentication type | Form based auth |
Credentials | email & password |
Access-token type | JWT |
Access-token stored in | COOKIE |
For authentication uses form, where user input username and password.
If input data is valid, will be created jwt-token and placed it in COOKIES.
- Super_admin can add to database users with different roles.
- Users can pass authentication with email and password placed in form.
- A JWT-token is generated during the authentication process and placed in COOKIES.
- Authenticated user can access endpoints via GET methods
- Authenticated admins can access endpoints via GET, POST, PUT, DELETE methods
- Logout process implemented by deleting access-token from cookie.
- To install dependencies in project dir run shell-command:
POETRY_VIRTUALENVS_IN_PROJECT=true poetry shell && poetry lock
The postgres database is used for data storage
- For launch postgres database in docker container run command:
docker compose up -d
- You must create and fill in the .env file by analogy with the .env.template file
cd ./src && uvicorn "loader:app"
- username = admin@example.com
- password = 1234567890
The tests are implemented with pytest.
To be able to run tests you should have database with name "pytest_db".