Fastapi-login

Latest version: v1.10.0

Safety actively analyzes 613603 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

1.10.0

- Add custom out-of-scope exception, defaults to `fastapi_login.exceptions.InsufficientScopeException`

py
manager = LoginManager(..., out_of_scope_exception=OutOfScopeException)


- Remove deprecated APIs

From version 1.10.0, the following usages will be no longer available:

py
manager.not_authenticated_exception = NotAuthenticatedException
manager = LoginManager(..., custom_exception=NotAuthenticatedException)

manager.useRequest(app)

manager.user_loader
def load_user(email):
...


Use these instead:

py
manager = LoginManager(..., not_authenticated_exception=NotAuthenticatedException)

manager.attach_middleware(app)

manager.user_loader()
def load_user(email):
...

1.9.3

- Refactor decoding token
- Remove `passlib`
- Bump dependencies

Now `passlib` should be used directly. This may be a breaking change for some users.

py
from config import DEFAULT_SETTINGS
from passlib.context import CryptContext

from fastapi_login import LoginManager

manager = LoginManager(DEFAULT_SETTINGS.secret, DEFAULT_SETTINGS.token_url)
pwd_context = CryptContext(schemes=["bcrypt"])


def hash_password(plaintext_password: str):
"""Return the hash of a password"""
return pwd_context.hash(plaintext_password)


def verify_password(password_input: str, hashed_password: str):
"""Check if the provided password matches"""
return pwd_context.verify(password_input, hashed_password)

1.9.2

- Revamp compatibility with `Pydantic`
- Bump dependencies

1.9.1

Mostly fixes and updates in regard to `Pydantic` v2. Thanks to [kigawas](https://github.com/kigawas).

- Update examples to support `Pydantic` v2.
- Fix potential type error against `Pydantic` v2.
- Add example dependencies in `pyproject.toml`.
- Remove `setup.py`
- Fixed example (Thanks [Lexachoc](https://github.com/Lexachoc))
- Fixed return type of user_loader (Thanks [kazunorimiura](https://github.com/kazunorimiura))

1.9.0

- User callback is now run asynchronous without blocking the worker thread [92](https://github.com/MushroomMaula/fastapi_login/pull/97)
- ``custom_exception`` argument has now correct type [97](https://github.com/MushroomMaula/fastapi_login/pull/97)
- Fixed some minor security issues by updating packages
- Now includes ``LoginManager.optional`` which will return `None` instead of raising an exception.
An [example](https://fastapi-login.readthedocs.io/usage/#returning-none-instead-of-raising-an-exception) has been added to the documentation.

1.8.3

Not secure
- Pin pyjwt dependency (Fixes [94](https://github.com/MushroomMaula/fastapi_login/issues/94))
- Switched from `setup.py` based publishing to using `pyproject.toml` together with poetry
- Switched publishing to poetry
- Update requirements in the examples projects
- Added correct header in `/examples/simples/templates/index.html` (Fixes [93](https://github.com/MushroomMaula/fastapi_login/issues/93) and [#95](https://github.com/MushroomMaula/fastapi_login/issues/95))

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.