c4de66b81c
Revamp authentication ( #831 )
...
* Implement Transport classes
* Implement authentication strategy classes
* Revamp authentication with Transport and Strategy
* Revamp strategy and OAuth so that they can use a callable dependency
* Update docstring
* Make ErrorCode a proper Enum and cleanup unused OpenAPI utils
* Remove useless check
* Tweak typing in authenticator
* Update docs
* Improve logout/destroy token logic
* Update docs
* Update docs
* Update docs and full examples
* Apply formatting to examples
* Update OAuth doc and examples
* Add migration doc
* Implement Redis session token
* Add Redis Session documentation
* RedisSession -> Redis
* Fix links in docs
2021-12-30 15:22:07 +01:00
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
48d1be87a4
Added codestyle check and lint to the build action ( #798 )
...
* Applied `make format`
* Added format-check to makefile
* Added a "Check codestyle" step to the build action.
* Rerun `make format`
* Added a "lint" target to makefile
* Added lint step to the build action
* Added W503 to the list of ignored flake8 errors.
See https://www.flake8rules.com/rules/W503.html
2021-11-23 08:13:11 +01:00
0c45cbc179
Add a name on every route #762 ( #774 )
...
* Names for urls added
* Tests for Login/Logout Names
* Register Name Test
* tests/test_router_reset.py
* Tests to verify url names in users router
* Test Verify Router Names
* oauth routes updated with prefix
* Test for authorize. Didn't right test for callback as covered under other tests
2021-11-02 08:12:43 +01:00
663b7405a7
Move forgot/reset password logic to manager
2021-09-15 09:13:11 +02:00
38d4aed817
Move on_after_register to manager
2021-09-14 15:02:17 +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
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
ef4a54c204
Allow lifetime_seconds to be None to get session cookies
2021-03-19 18:19:58 +01:00
d4227ae20f
Fix #335 : implement after_reset_password handler
2021-01-12 11:18:34 +01: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