mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-03 05:27:06 +08:00
Drop Python 3.8 support
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import secrets
|
||||
from typing import Optional, Protocol, Tuple, Union
|
||||
from typing import Optional, Protocol, Union
|
||||
|
||||
from pwdlib import PasswordHash
|
||||
from pwdlib.hashers.argon2 import Argon2Hasher
|
||||
@ -9,7 +9,7 @@ from pwdlib.hashers.bcrypt import BcryptHasher
|
||||
class PasswordHelperProtocol(Protocol):
|
||||
def verify_and_update(
|
||||
self, plain_password: str, hashed_password: str
|
||||
) -> Tuple[bool, Union[str, None]]: ... # pragma: no cover
|
||||
) -> tuple[bool, Union[str, None]]: ... # pragma: no cover
|
||||
|
||||
def hash(self, password: str) -> str: ... # pragma: no cover
|
||||
|
||||
@ -30,7 +30,7 @@ class PasswordHelper(PasswordHelperProtocol):
|
||||
|
||||
def verify_and_update(
|
||||
self, plain_password: str, hashed_password: str
|
||||
) -> Tuple[bool, Union[str, None]]:
|
||||
) -> tuple[bool, Union[str, None]]:
|
||||
return self.password_hash.verify_and_update(plain_password, hashed_password)
|
||||
|
||||
def hash(self, password: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user