38 Commits

Author SHA1 Message Date
6fbddbafed fix jwt parameter parsing error 2023-05-19 19:17:03 +08:00
4c12c53e94 add token storage and logout (#57)
* add token storage and logout

* fix jwt expire time bug
2023-05-19 16:42:43 +08:00
wu
65f6916c20 Update the uniform return method to success 2023-05-18 18:35:23 +08:00
5bded3433f Bump fastapi from 0.95.0 to 0.95.2 (#53) 2023-05-18 17:05:16 +08:00
e1edcade21 Add RBAC authorisation and some tools or optimisations (#41)
* WIP: add rbac authorization

* Perform pre-commit fixes

* add rbac route whitelist

* add init test data user role associations

* Restore database table id naming to fix generic crud base

* Add database section value uniqueness settings

* Update the test directory to tests

* Update route_name file name to health_check

* Split user auth and user action interfaces

* Fix conflict between merge and current branch

* Add pymysql dependencies

* Fix RBAC authentication method

* Add the select serialisation tool

* Fix missing return messages due to global exception handler slicing

* Update the user interface with associated relationships

* Add items to be completed

* Perform pre-commit fixes

* Add pre-made routers

* Paging data return structure optimisation

* Split user auth and user interface tests

* Fix user register test data structure error

* Fix duplicate named test classes
2023-05-17 22:13:37 +08:00
cee2c5843e Bump starlette from 0.26.1 to 0.27.0
Bumps [starlette](https://github.com/encode/starlette) from 0.26.1 to 0.27.0.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.26.1...0.27.0)

---
updated-dependencies:
- dependency-name: starlette
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-17 13:43:26 +08:00
dff62601d0 Fix the swagger form login structure abnormality (#46) 2023-05-16 15:13:45 +08:00
wu
4aace9f68a delete ci workflows for GitHub 2023-05-13 01:56:54 +08:00
wu
8edd88ff99 add ci workflows to GitHub 2023-05-13 01:35:30 +08:00
24024d4bf0 fix that the data validation global exception handler does not work (#40)
* fix that the data validation global exception handler does not work

* update login api test

* update the JSON login method to create the user ID of the token
2023-05-13 01:29:15 +08:00
768a13f014 add test code (#37)
* add test code

* add a pre test prompt

* exec pre-commit
2023-05-11 15:20:57 +08:00
a19d942bd7 add the get project config api (#33)
* add the get project config api

* delete the password values
2023-05-11 15:20:21 +08:00
2a51c76493 Update the sub router settings in the subdirectory (#32) 2023-05-07 15:21:33 +08:00
0bd01f425f update Dockerfile and docker-compose.yml (#31)
* update Dockerfile and docker-compose.yml

* Fix log file type-checking
2023-05-07 15:21:03 +08:00
64f2a13e37 update to python3.10 (#29) 2023-05-03 17:10:55 +08:00
4e6284eafe improving project configuration (#25)
* delete unused email configuration

* update the default env configuration file to `.env`

* update log file name configuration

* update alembic migration file naming style

* delete the comma after the env_file variable
2023-04-25 16:14:33 +08:00
wu
d6cf5d8aef update the ruff rules and format the code 2023-04-25 14:43:53 +08:00
wu
5b09237835 add black support 2023-04-24 18:47:40 +08:00
wu
28916cc833 add pre-commit support 2023-04-24 13:44:32 +08:00
wu
ecb1fcf940 update the ruff settings 2023-04-23 23:12:06 +08:00
wu
972af0ffb0 add ruff support 2023-04-23 08:41:11 +08:00
wu
be2f69eae7 optimize import 2023-04-23 08:40:30 +08:00
wu
f3561e7fa0 Update the env variable file encoding to utf-8 2023-04-22 14:46:05 +08:00
wu
4e637c407c update the location and comments of the config file constants 2023-04-21 23:58:00 +08:00
b9e4ac31eb Add environment variable management and fix Pydantic validation error (#15)
* Use env to manage important configurations and distinguish environments

* fix Pydantic validation error caused by None value in links field of Page class

* Production environment no longer exposes API docs

* Extract TOKEN_URL to conf
2023-04-21 20:10:07 +08:00
wu
8dc6081c10 update get_user_info to get_userinfo 2023-04-20 21:16:12 +08:00
wu
9b5f418e2c delete the code related to the avatar file 2023-04-20 18:46:51 +08:00
wu
2802fc2253 clean up the utils code 2023-04-20 18:46:51 +08:00
wu
7ce3e607cd simplify user apis #11 2023-04-20 18:46:51 +08:00
wu
77cd87ee0e fix get_user_info func return None #9 2023-04-19 16:04:14 +08:00
wu
354ba1ccc3 update pagination links by create_links 2023-04-19 11:05:49 +08:00
wu
60192b044b fix the default host config for redis 2023-04-19 11:05:49 +08:00
wu
b18d51acfb add uvicorn base settings 2023-04-19 11:05:49 +08:00
wu
9481500b27 update DependsSession to CurrentSession 2023-04-19 11:05:49 +08:00
wu
b335fc1be7 fix user file Page import error 2023-04-19 11:05:49 +08:00
wu
385209c868 fix the default host config for mysql 2023-04-19 11:05:49 +08:00
wu
135074ec73 commit the base code 2023-04-19 11:05:49 +08:00
wu
38e7a06311 Initial commit 2023-04-07 13:21:38 +08:00