13 Commits

Author SHA1 Message Date
71ca7d85ed Remove default router on FastAPIUsers 2020-05-24 10:50:14 +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
9353bb79cb Implement on_after_update event handle 2020-02-03 10:48:53 +01:00
88b133d41c Implement OAuth2 flow (#88)
* Move users router in sub-module

* Factorize UserRouter into EventHandlersRouter

* Implement OAuth registration/login router

* Apply isort/black

* Remove temporary pytest marker

* Fix httpx-oauth version in lock file

* Ensure ON_AFTER_REGISTER event is triggered on OAuth registration

* Add API on FastAPIUsers to generate an OAuth router

* Improve test coverage of FastAPIUsers

* Small fixes

* Write the OAuth documentation

* Fix SQL unit-tests by avoiding collisions in SQLite db files
2020-01-17 11:43:17 +01:00
104a6c6bf5 Inject every models variations and DB model in DB adapters (#84)
* Inject every model variations in router and DB model in DB adapters

* Update documentation and import Tortoise in db module

* Use path operation decorator dependencies for superuser routes
2020-01-04 15:36:34 +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
b512197094 Use singular Event enum name 2019-10-31 09:59:41 +01:00
3506df31e7 Add ON_AFTER_REGISTER event handler 2019-10-25 08:28:29 +02:00
008a8296f2 Define on_after_forgot_password with a decorator 2019-10-24 09:18:07 +02:00
1e1a3dc06a Setup Flit and lock packages versions 2019-10-17 07:48:39 +02:00
49daeff869 Close #3: forgot/reset password routes 2019-10-13 12:05:10 +02:00
76bb7bf6a5 Implement variant of dep injections to get active/super user 2019-10-11 08:09:47 +02:00
ef796abb55 Reorganize base modules 2019-10-10 19:21:36 +02:00