service_man/api/infrastructure/dependencies/protocols.py

13 lines
466 B
Python

from api.application.protocols.date_time import DateTimeProvider
from api.application.protocols.password_hasher import PasswordHasher
from api.infrastructure.date_time import SystemDateTimeProvider, Timezone
from api.infrastructure.security.password_hasher import Pbkdf2PasswordHasher
def get_password_hasher() -> PasswordHasher:
return Pbkdf2PasswordHasher()
def get_date_time_provider() -> DateTimeProvider:
return SystemDateTimeProvider(Timezone.UTC)