14 Commits

Author SHA1 Message Date
c759bb6915 Extending generated OpenAPI docs (#799)
* Added login endpoint docs

* make format

* Changed login route into multiple examples.

* Added reset password router docs

* Updated /{id} routes for user

* Updated /me routes

* Fixed user already exists response description

* Updated the /register route

* Updated verify routes

* Updated oauth2 endpoints.

* Applied `make format`

* Renamed Authentication methods for getting their openapi schemas

- `get_login_responses_success` -> `get_openapi_login_responses_success`
- `get_logout_responses_success` -> `get_openapi_logout_responses_success`

* Fixed flake8 errors

* Not using `Final` to keep python37 compatibility

Co-authored-by: François Voron <fvoron@gmail.com>
2021-11-23 13:13:51 +01:00
eb47dc8e75 Pass user_manager instance in get_login_response/get_logout_response 2021-09-21 08:28:25 +02:00
eda3676fd0 Small tweaks 2021-09-15 16:11:53 +02:00
8967138375 Inject a user manager dep callable directly to FastAPIUsers 2021-09-14 14:39:59 +02:00
480a6bc4df Move validate_password into UserManager 2021-09-14 14:01:57 +02:00
fdc8e54253 Improve generic typing 2021-09-14 11:53:43 +02:00
dade8c263d Revamp implementation with a manager layer and db class as dependency callable 2021-09-14 11:12:34 +02:00
7ae2042500 Fix #701: factorize JWT handling and support secrets as SecretStr 2021-09-09 11:51:55 +02:00
ef4a54c204 Allow lifetime_seconds to be None to get session cookies 2021-03-19 18:19:58 +01:00
8adce74cd9 added samesite option for cookie authentication (#337)
* added samesite option for cookie authentication

* formatted with black and added documentation (grabbed from starlette.io documentation)
2020-09-30 07:27:25 +02:00
7721f8dcc1 Revamp authentication routes structure (#201)
* Fix #68: use makefun to generate dynamic dependencies

* Remove every Starlette imports

* Split every routers and remove event handlers

* Make users router optional

* Pass after_update handler to get_users_router

* Update documentation

* Remove test file

* Write migration doc for splitted routers
2020-05-24 10:18:01 +02:00
05b1df9a16 Implement logout route 2020-02-03 10:12:33 +01:00
dbbb9144b0 Expose more options for Cookie authentication 2020-01-11 10:55:02 +01:00
49deb437a6 Fix #42: multiple authentication backends (#47)
* Revamp authentication to allow multiple backends

* Make router generate a login route for each backend

* Apply black

* Remove unused imports

* Complete docstrings

* Update documentation

* WIP add cookie auth

* Complete cookie auth unit tests

* Add documentation for cookie auth

* Fix cookie backend default name

* Don't make cookie return a Response
2019-12-04 13:32:49 +01:00