75 Commits

Author SHA1 Message Date
3e41826c85 Bump version: 0.6.6 → 0.7.0 2020-03-01 08:29:22 +01:00
ce2d96fd82 Bump version: 0.6.5 → 0.6.6 2020-02-07 08:47:59 +01:00
523ecddd06 Bump version: 0.6.4 → 0.6.5 2020-02-05 09:43:52 +01:00
e58f18582e Fix tortoise import error (#97)
I was getting an import error using tortoise 0.1.1: `ImportError: cannot import name 'Model' from 'tortoise'`.  These few changes seemed to have resolved the issue.
2020-02-05 09:20:28 +01:00
74d1eaea64 Bump version: 0.6.3 → 0.6.4 2020-02-03 10:55:42 +01:00
9353bb79cb Implement on_after_update event handle 2020-02-03 10:48:53 +01:00
05b1df9a16 Implement logout route 2020-02-03 10:12:33 +01:00
d1006667d0 Bump version: 0.6.2 → 0.6.3 2020-01-20 12:22:05 +01:00
325882436c Fix on_after_register handler not being passed Request with OAuth 2020-01-20 12:22:02 +01:00
2585b4fd1c Bump version: 0.6.1 → 0.6.2 2020-01-20 11:01:36 +01:00
57a37150a0 Add Request in event_handlers arguments 2020-01-20 10:46:45 +01:00
7279b44e19 Bump version: 0.6.0 → 0.6.1 2020-01-17 16:18:57 +01:00
fff167043a Fix authorize not using arbitrary redirect url 2020-01-17 16:18:49 +01:00
cc727ac324 Bump version: 0.5.1 → 0.6.0 2020-01-17 11:47:10 +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
8fe1997dbc Bump version: 0.5.0 → 0.5.1 2020-01-11 10:55:15 +01:00
dbbb9144b0 Expose more options for Cookie authentication 2020-01-11 10:55:02 +01:00
e743e48cc5 Bump version: 0.4.1 → 0.5.0 2020-01-04 15:58:16 +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
935bccf528 Bump version: 0.4.0 → 0.4.1 2019-12-17 15:50:12 +01:00
7817d372c6 Fix #77: use CharField for PK in Tortoise adapter 2019-12-17 15:49:30 +01:00
edb887f3f1 Bump version: 0.3.2 → 0.4.0 2019-12-04 13:34:23 +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
b5b0bbbb01 Tortoise ORM support (#59)
* add tortoise to dependencies

* add tortoise as optional dependency in pyproject.toml

* add tortoise support (tests needed)

* Add tortoise support (also defined orm_mode in pydantic model

* tests for tortoise support

* format by black

* docs for tortoise

* delete type annotations

* delete underscore

* do it in 1 line

* add 1 line before yield

* fix in docs

* fix bug and add annotation for test

* Tweak documentation and fix Tortoise error about id update

* Improve Tortoise coverage by using get instead of filter

* Fix Pipfile.lock
2019-12-03 21:24:27 +01:00
59b8f144d7 Bump fastapi from 0.43.0 to 0.44.0 (#63)
* Bump fastapi from 0.43.0 to 0.44.0

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Changelog](https://github.com/tiangolo/fastapi/blob/master/docs/history-design-future.md)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.43.0...0.44.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix breaking changes and depreciation following fastapi 0.44.0

* Bump fastapi==0.44.0 in pyproject.toml
2019-11-28 07:33:38 +01:00
f0178d0e0d Bump version: 0.3.1 → 0.3.2 2019-11-25 12:56:16 +01:00
9aa8398884 Do a proper Pydantic model instantation in SQLAlchemy adapter 2019-11-17 09:59:44 +01:00
47ad4ce1cc Fix #36: fix token url in auto doc (#38)
* Fix #36: fix token url in auto doc

* Define OAuth scheme in authentication base with default /users/login tokenUrl
* Allow to override it through contructor argument of auth class

* Fix test coverage of BaseAuthentication
2019-11-03 09:20:16 +01:00
6ba8bb835e Bump version: 0.3.0 → 0.3.1 2019-10-31 21:44:08 +01:00
60c815e425 Fix #35: catch import error when not having optional DB depedencies 2019-10-31 21:43:29 +01:00
658161518a Add error codes on routes (#34)
Fix #33
2019-10-31 10:10:53 +01:00
b512197094 Use singular Event enum name 2019-10-31 09:59:41 +01:00
8200e44b38 Bump version: 0.2.0 → 0.3.0 2019-10-29 13:36:13 +01:00
f6ab644691 Apply Black formatting 2019-10-29 13:35:38 +01:00
9b7ec58800 #21: Add superuser routes (#30)
* Add CRU superuser routes

* Add delete method on DB adapters

* Add superuser delete route

* Add superuser routes documentation

* Pass black formatter
2019-10-29 13:32:44 +01:00
ab0b187f20 Implement MongoDB database adapter (#29)
* Implement MongoDB adapter using motor

* Add mongo container to build pipeline

* Tidy up dependencies

* Update documentation for MongoDB

* Export MongoDB adapter from db package

* Pass black format

* Update README
2019-10-27 16:34:30 +01:00
3875632c80 Run the anti-timing attack hash only when user is None 2019-10-25 09:10:30 +02:00
3a84e02788 Bump version: 0.1.0 → 0.2.0 2019-10-25 08:34:53 +02: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
089d088268 Fix Deepsource issues (#22)
* Fix Deepsource issues

* Add docs/ to Deepsource exclusion list

* Fix black formatting
2019-10-20 16:16:52 +02:00
c4c33820c2 Bump version: 0.0.2 → 0.1.0 2019-10-20 10:37:33 +02:00
e146e4bca4 Fix #13: add /me update route 2019-10-20 10:11:48 +02:00
1996ed69ea Fix #14: add /me route 2019-10-20 09:30:26 +02:00
8d65a11a4f Fix #17: prevent to set is_active/is_superuser on register route 2019-10-19 18:56:54 +02:00
5d4979f9a9 Fix #19: 201 status code on successful registration 2019-10-19 18:36:57 +02:00
a4171f8bea Fix #18: check for existing user on registration 2019-10-19 18:31:08 +02:00
a5618399a1 Fix #9: Write documentation (#16)
* Start to write documentation

* Add docs favicon

* Add routes documentation

* Add doc about dependency callables

* Add information about how to make authenticated calls
2019-10-19 18:16:08 +02:00
4ddbda797c Bump version 2019-10-17 07:50:22 +02:00
1e1a3dc06a Setup Flit and lock packages versions 2019-10-17 07:48:39 +02:00