service_man/api/infrastructure/dependencies/protocols.py

13 lines
466 B
Python
Raw Normal View History

2024-04-02 22:33:15 +03:00
from api.application.protocols.date_time import DateTimeProvider
from api.application.protocols.password_hasher import PasswordHasher
2024-04-02 22:33:15 +03:00
from api.infrastructure.date_time import SystemDateTimeProvider, Timezone
from api.infrastructure.security.password_hasher import Pbkdf2PasswordHasher
def get_password_hasher() -> PasswordHasher:
return Pbkdf2PasswordHasher()
2024-04-02 22:33:15 +03:00
def get_date_time_provider() -> DateTimeProvider:
return SystemDateTimeProvider(Timezone.UTC)