feat(): migrate to auth identity

This commit is contained in:
doas root
2025-11-18 00:25:24 +03:00
parent 63a057b020
commit f44e688662
18 changed files with 219 additions and 48 deletions
@@ -0,0 +1,17 @@
from typing import TYPE_CHECKING, override
from template_project.application.auth_identity.entity import AuthMethod
from template_project.application.common.errors import ApplicationError, to_error
if TYPE_CHECKING:
pass
@to_error
class UserAlreadyExistsError(ApplicationError):
identifier: str
auth_method: AuthMethod
@override
def __str__(self) -> str:
return f"User with identifier={self.identifier!r} and auth method={self.auth_method.value} already exists"