163 Commits

Author SHA1 Message Date
4efaaaaa61 Bump version: 6.1.3 → 7.0.0 2021-09-09 13:12:22 +02:00
370194ff6e Remove deprecated dependency callables 2021-09-09 12:15:06 +02:00
7ae2042500 Fix #701: factorize JWT handling and support secrets as SecretStr 2021-09-09 11:51:55 +02:00
e59fb2c9b9 Return 403 instead of 401 when a user is known (#705)
* return 403 instead of 401 if user is known

* return 403 for unverified users

* updated docs
2021-09-04 18:11:48 +02:00
ce69ea5b8a Apply formatting 2021-08-29 17:00:59 +02:00
83873338f3 Refactor models 2021-08-29 17:00:45 +02:00
a95b6c45dd Fix mypy configuration 2021-08-29 15:36:04 +02:00
45354ee9f0 Use default_factory in model for UUID4 generation 2021-08-29 15:35:56 +02:00
848315badc Remove DB dependencies (#704)
* Remove database adapter in favor of external dependencies

* Prevent flit from installing all optional dependencies when testing build

* Remove MongoDB service during CI build
2021-08-27 17:01:50 +02:00
3b550adc60 Bump version: 6.1.2 → 6.1.3 2021-08-27 16:03:07 +02:00
37d03ea730 Update repository paths 2021-08-27 16:00:27 +02:00
d0501b363e Bump version: 6.1.1 → 6.1.2 2021-08-13 08:58:28 +02:00
Ben
bfc2380320 Enable custom JWT token audiences (#649) 2021-07-17 10:00:42 +02:00
9e35dbf450 Bump version: 6.1.0 → 6.1.1 2021-07-10 11:22:21 +02:00
89c87c97f4 return empty response with 204 (#650) 2021-07-03 20:19:48 +02:00
728c160b50 Added python_type into GUID (#648) 2021-06-25 16:45:31 +02:00
c5f0eb2931 Bump version: 6.0.0 → 6.1.0 2021-05-20 08:52:48 +02:00
455f695f52 Fix #630: relative tokenUrl (#636)
* Fix #630: use relative tokenUrl as per the official recommendations

* Improve following review comments

* Fix unmatching backtick

* Improve consistency of authentication backend documentation
2021-05-20 08:52:03 +02:00
a690e82408 Fix typing errors 2021-05-17 09:00:34 +02:00
5267e605f4 Implement password validation mechanism (#632)
* Implement password validation mechanism

* Add invalid password reason

* Always pass user in password validator

* Add password validation documentation
2021-05-17 08:58:23 +02:00
13029cb73d Bump version: 5.1.4 → 6.0.0 2021-04-20 14:46:54 +02:00
3ac67377cb Fix #600: revamp Tortoise/Pydantic interaction (#612) 2021-04-20 14:46:36 +02:00
61a99755e8 Bump version: 5.1.3 → 5.1.4 2021-04-20 14:40:57 +02:00
d184d7e90c Fix #609: make behavior more consistent on request verify token
Now, it always returns 202 even if the user is already verified
2021-04-20 13:54:50 +02:00
461e84acae Fix #561: Update a user with an email already existing in DB raises an error 2021-04-20 13:49:00 +02:00
e885525497 Bump version: 5.1.2 → 5.1.3 2021-03-29 08:08:57 +02:00
ef4a54c204 Allow lifetime_seconds to be None to get session cookies 2021-03-19 18:19:58 +01:00
e7ceb1569c Bump version: 5.1.1 → 5.1.2 2021-03-08 17:07:16 +01:00
66d7c76a89 Fix BaseUserDB typing by making email, is_active, is_superuser and is_verified non optional 2021-03-08 17:07:07 +01:00
addad8aba7 Bump version: 5.1.0 → 5.1.1 2021-03-04 19:01:03 +01:00
5258c24762 Apply black 2021-03-04 17:50:37 +01:00
8eb53f4744 Fix #515: remove calls to deprecated user callables in internal codebase 2021-03-04 17:50:19 +01:00
c41b4d1bd4 Add py.typed to the package 2021-03-04 17:37:28 +01:00
7ac5dc8486 Bump version: 5.0.0 → 5.1.0 2021-02-07 09:59:44 +01:00
48d9a399e0 Fix type errors 2021-02-07 09:58:52 +01:00
4b5a79ae08 Update depreciation flag for dep callables 2021-02-07 09:45:03 +01:00
579313f887 Ormar backend support (#470)
* Add db adapter for ormar (wip)

* finish ormar support enough to pass tests

* remove idea folder

* update ormar version in tool.flit.metadata.requires-extra

* Add documentation about ormar

* Apply isort and black formatting

* Restore python 3.7 in Pipfile

* Update build.yml

* Add missing test for ormar update

* changes after review

Co-authored-by: Paolo Dina <paolo.dina@codingmoth.com>
Co-authored-by: collerek <collerek@gmail.com>
2021-02-07 09:34:40 +01:00
4776117f10 Write the docs for new current_user dependency 2021-02-06 13:55:41 +01:00
3146a1ffe6 Fix #475: add uuid convertor to routes so they are not catching custom routes 2021-02-06 11:16:15 +01:00
968bc16585 Add depreciation warning to predefined authenticator deps 2021-01-13 18:53:38 +01:00
58b8d28c76 Improve Authenticator class to generate dependency variations more easily 2021-01-13 18:07:25 +01:00
9f69b4762a Bump version: 4.0.0 → 5.0.0 2021-01-12 11:25:10 +01:00
1df6e7d162 Fix get_verify_router docstring 2021-01-12 11:21:23 +01:00
d4227ae20f Fix #335: implement after_reset_password handler 2021-01-12 11:18:34 +01:00
2829824a95 Fix #438: issue while retrieving OAuth accounts with PSQL 2021-01-12 10:53:40 +01:00
373157c284 Finalize user activation feature (#439)
* Add routes for user activation (#403)

* Add routes for user activation

Generate a token after creating the user in register route, passing to `activation_callback`, if `activation_callback` supplied
Create new `/activate` route that will verify the token and activate the user
Add new error codes to `fastapi_users/router/common.py`
Update documentation
Add tests

Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>

* Rework routes for user activation

* Separate verification logic and token generation into `/fastapi_users/router/verify.py`, with per-route callbacks for custom behaviour

* Return register router to original state

* Added `is_verified` property to user models

* Added `requires_verification` argument to `get_users_router`and `get_auth_router`

* Additional dependencies added for verification in `fastapi_users/authentication/__init__.py`

* Update tests for new behaviour

* Update `README.md` to describe a workaround for possible problems during testing, by exceeding ulimit file descriptor limit

Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>

* Restored docs to original state.

* All other modifications reqested added

Kebab-case on request-verify-token
SECRET now used as test string
Other minor changes

Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>

* Embed token in body in verify route

* Reorganize checks in verify route and add unit test

* Ignore coverage on Protocol classes

* Tweak verify_user function to take full user in parameter

* Improve unit tests structure regarding parametrized test client

* Make after_verification_request optional to be more consistent with other routers

* Tweak status codes on verify routes

* Write documentation for verification feature

* Add not released warning on verify docs

Co-authored-by: Edd Salkield <edd@salkield.uk>
Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>
2021-01-12 10:44:42 +01:00
7f6e3c9253 Bump version: 3.1.2 → 4.0.0 2020-12-28 09:12:47 +01:00
7cf7154e27 Fix #431: make OAuth expires_at optional in model and DB schemas 2020-12-28 08:59:27 +01:00
92c523c379 Upgrade to pyjwt==2.0.0 2020-12-24 09:47:34 +01:00
7e2ca9551e Bump version: 3.1.1 → 3.1.2 2020-12-23 17:35:30 +01:00