checking
This commit is contained in:
@@ -26,7 +26,9 @@ class AuthService:
|
||||
Returns:
|
||||
Hash bcrypt de la contraseña
|
||||
"""
|
||||
return pwd_context.hash(password)
|
||||
# Bcrypt tiene límite de 72 bytes
|
||||
password_truncated = password[:72]
|
||||
return pwd_context.hash(password_truncated)
|
||||
|
||||
def verify_password(self, plain_password: str, hashed_password: str) -> bool:
|
||||
"""
|
||||
@@ -39,7 +41,9 @@ class AuthService:
|
||||
Returns:
|
||||
True si la contraseña es correcta, False en caso contrario
|
||||
"""
|
||||
return pwd_context.verify(plain_password, hashed_password)
|
||||
# Bcrypt tiene límite de 72 bytes
|
||||
plain_password_truncated = plain_password[:72]
|
||||
return pwd_context.verify(plain_password_truncated, hashed_password)
|
||||
|
||||
def create_access_token(self, user_id: int, email: str) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user