From 123ddca48f2e5b913166a69cdd25b5d98bd8b4fe Mon Sep 17 00:00:00 2001 From: Mawoka Date: Thu, 7 Apr 2022 20:42:17 +0200 Subject: [PATCH] :label: Added types to password_functions --- classquiz/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classquiz/auth.py b/classquiz/auth.py index bff0e3b..0813aae 100644 --- a/classquiz/auth.py +++ b/classquiz/auth.py @@ -56,11 +56,11 @@ class OAuth2PasswordBearerWithCookie(OAuth2): oauth2_scheme = OAuth2PasswordBearerWithCookie(tokenUrl="/api/v1/users/token/cookie") -def verify_password(plain_password, hashed_password): +def verify_password(plain_password: str, hashed_password: str) -> bool: return pwd_context.verify(plain_password, hashed_password) -def get_password_hash(password): +def get_password_hash(password: str) -> str: return pwd_context.hash(password)