Commit Graph

254 Commits

Author SHA1 Message Date
François Voron
6bc29dd23a Bump version: 10.1.3 → 10.1.4 2022-07-25 10:26:28 +02:00
François Voron
d661585238 Revert "Cookie transport must return empty json and not null in response.data on login (#1037)"
This reverts commit 77d0077503.
2022-07-25 10:23:55 +02:00
François Voron
e25b82c090 Bump version: 10.1.2 → 10.1.3 2022-07-23 07:56:58 +00:00
François Voron
d7a1e3420c Fix #1043: Add a prefix to the generated key in RedisStrategy 2022-07-23 07:53:57 +00:00
François Voron
184d3ed101 Bump version: 10.1.1 → 10.1.2 2022-07-22 16:07:46 +02:00
Can H. Tartanoglu
77d0077503 Cookie transport must return empty json and not null in response.data on login (#1037)
* Fix: LoginResponse is set to application/json, and should return response with status code 204 when body is empty.

The database backend login response is a cookie header with empty body. This causes issues when integrating the openapi schema into openapi-generator. Because the code generator expects the response to be a JSON when the status code isn't 204.

* Fix: Bump fastapi version to appropriate version for status code 204 handling.

* Build a full response for CookieTransport login_response

Co-authored-by: Can H. Tartanoglu <2947298-caniko@users.noreply.gitlab.com>
Co-authored-by: François Voron <fvoron@gmail.com>
2022-07-22 15:53:56 +02:00
François Voron
f38a35ec56 Bump version: 10.1.0 → 10.1.1 2022-06-21 10:01:35 +02:00
François Voron
6f5b2b1503 Fix get_oauth_associate_router import to make it optional 2022-06-21 09:58:33 +02:00
François Voron
f5f4ea482e Bump version: 10.0.7 → 10.1.0 2022-06-21 08:04:17 +02:00
François Voron
f4338ca3df Handle UserAlreadyExists error in oauth callback route 2022-06-20 16:55:58 +02:00
François Voron
ce15284fe9 Implement a router to associate an OAuth account with an authenticated user 2022-06-20 14:44:25 +02:00
François Voron
64d3996415 Add flag to enable/disable email association with OAuth 2022-06-20 13:46:47 +02:00
schwannden
3bb3728261 add on delete hook (#1014)
Co-authored-by: Schwannden Kuo <schwannden@mobagel.com>
2022-06-20 13:26:02 +02:00
François Voron
2a6128c9fc Bump version: 10.0.6 → 10.0.7 2022-06-07 08:49:15 +02:00
François Voron
c5ac2b0e6e Use newer version of Redis dependency incorporating async support 2022-06-07 08:43:41 +02:00
François Voron
b59fc794f3 Bump version: 10.0.5 → 10.0.6 2022-05-27 09:49:39 +02:00
François Voron
8121ad0b8c Bump version: 10.0.4 → 10.0.5 2022-05-25 08:50:21 +02:00
François Voron
1b6b58c0e0 Manually cast user to User schema in routes to avoid issue #1000 2022-05-25 08:27:46 +02:00
François Voron
e8635d9132 Bump version: 10.0.3 → 10.0.4 2022-05-19 14:45:22 +02:00
François Voron
2477fdffc1 Bump version: 10.0.2 → 10.0.3 2022-05-10 08:42:09 +02:00
François Voron
d0d1a0dea1 Bump version: 10.0.1 → 10.0.2 2022-05-06 15:04:15 +02:00
François Voron
c1ce87b4fe Set orm_mode on BaseUser schema 2022-05-06 14:56:49 +02:00
François Voron
15ce3eaab6 Bump version: 10.0.0 → 10.0.1 2022-05-06 13:20:33 +02:00
François Voron
78be936297 Put exceptions in a dedicated module to avoid circular imports 2022-05-06 13:17:22 +02:00
François Voron
5f57c75813 Fix AuthenticationBackend typing 2022-05-05 18:16:16 +02:00
François Voron
685984e6e3 Bump version: 9.3.2 → 10.0.0 2022-05-05 14:58:45 +02:00
François Voron
72aa68c462 Native model and generic ID (#971)
* Use a generic Protocol model for User instead of Pydantic

* Remove UserDB Pydantic schema

* Harmonize schema variable naming to avoid confusions

* Revamp OAuth account model management

* Revamp AccessToken DB strategy to adopt generic model approach

* Make ID a generic instead of forcing UUIDs

* Improve generic typing

* Improve Strategy typing

* Tweak base DB typing

* Don't set Pydantic schemas on FastAPIUsers class: pass it directly on router creation

* Add IntegerIdMixin and export related classes

* Start to revamp doc for V10

* Revamp OAuth documentation

* Fix code highlights

* Write the 9.x.x ➡️ 10.x.x migration doc

* Fix pyproject.toml
2022-05-05 14:51:19 +02:00
François Voron
b7734fc8b0 Bump version: 9.3.1 → 9.3.2 2022-05-05 11:56:39 +02:00
François Voron
05042b5a1e Bump version: 9.3.0 → 9.3.1 2022-04-21 11:23:10 +02:00
Richard Friberg
18954cc7bd Add simple solution to update of oauth with more consistent use of identifiers (#953) 2022-04-21 11:06:21 +02:00
François Voron
6ba70bdbc6 Bump version: 9.2.6 → 9.3.0 2022-03-22 15:12:19 +01:00
François Voron
7f6d038d91 Create a class helper to let configure the password hasher dynamically 2022-03-22 14:16:49 +01:00
Joe Taylor
b054383fbf Enable RS256/ES256 and other algorithms for JWT strategy (#943)
* Implement RS256 for JWT auth

* Update docs with RS256 example

* Added ES256 tests

* Format with isort and black

* Removed example RSA key pair (so as not to tempt people to use it)

* Added pyjwt[crypto] to requirements

* Removed pycryptodome by hardcoding example keys

* Removed unnecessary Tuple import from typing
2022-03-22 10:28:00 +01:00
François Voron
0db2ce9d9e Bump version: 9.2.5 → 9.2.6 2022-03-16 09:05:43 +01:00
François Voron
06ad0371fb Bump version: 9.2.4 → 9.2.5 2022-02-18 11:11:55 +01:00
François Voron
e79b34ed35 Fix #922: allow DependencyCallable type to be generators 2022-02-18 11:04:56 +01:00
Gaganpreet
04e432acad Unique names for routes (#916) 2022-02-11 08:07:45 +01:00
François Voron
29cfe8ae5e Bump version: 9.2.3 → 9.2.4 2022-02-07 08:57:19 +01:00
François Voron
e3923d14b9 Bump version: 9.2.2 → 9.2.3 2022-02-01 09:29:58 +01:00
François Voron
0583d7c88e Bump version: 9.2.1 → 9.2.2 2022-01-15 11:22:59 +01:00
François Voron
533504634f Improve dependencies typing 2022-01-15 11:08:49 +01:00
Alexandr Makurin
e6125905e0 Fix #865 (#866)
* Fix #865

* Add # pragma: no cover to all try blocks

* Fix same issue with root module
2022-01-15 10:50:06 +01:00
François Voron
0a8661b762 Bump version: 9.2.0 → 9.2.1 2022-01-10 12:58:48 +01:00
Hazedd
7138143923 Patch 2 (#855)
* logout response sets proper response headers

logout response is using starlette delete cookie. In starlette the samesite and secure attributes are not in the header but are needed to set the removed cookie client side. Implementing set_cookie with an empty cookie-value and a max_age of 0 will set a new expired cookie by the client.

related issue #846

* fixed linting

Co-authored-by: Pentem <martijn.pentenga@movares.nl>
2022-01-10 09:05:36 +01:00
François Voron
896813d278 Bump version: 9.1.1 → 9.2.0 2022-01-04 16:03:47 +01:00
David Brochart
79557eead4 Allow lifetime_seconds=None (#835) 2022-01-03 12:05:55 +01:00
François Voron
d469bace6e Bump version: 9.1.0 → 9.1.1 2022-01-03 11:29:05 +01:00
François Voron
1ede89933a Revert "Enable Argon2 for password hashing"
This reverts commit 123328c559.
2022-01-03 10:37:15 +01:00
François Voron
123328c559 Enable Argon2 for password hashing 2021-12-31 16:05:00 +01:00
François Voron
96a086c60f Bump version: 9.0.1 → 9.1.0 2021-12-31 14:44:07 +01:00