login tested updated

This commit is contained in:
2025-01-26 23:00:58 +03:00
parent a7e48d8755
commit bc300f727a
12 changed files with 65 additions and 145 deletions

View File

@@ -26,6 +26,7 @@ from .function_handlers import (
)
# Auth Login
authentication_login_super_user_event = Event(
name="authentication_login_super_user_event",

View File

@@ -46,15 +46,16 @@ AuthenticationLoginEventMethods = MethodToEvent(
description="Login to the system via domain, access key : [email] | [phone]",
)
def authentication_login_with_domain_and_creds(
def authentication_login_with_domain_and_creds_endpoint(
request: Request,
data: EndpointBaseRequestModel,
) -> Dict[str, Any]:
function = AuthenticationLoginEventMethods.retrieve_event(event_function_code=f"{authentication_login_super_user_event.key}")
return function.endpoint_callable(request=request, data=data)
event_2_catch = AuthenticationLoginEventMethods.retrieve_event(event_function_code=f"{authentication_login_super_user_event.key}")
data = event_2_catch.REQUEST_VALIDATOR(**data.data)
return event_2_catch.endpoint_callable(request=request, data=data)
AuthenticationLoginEventMethods.endpoint_callable = authentication_login_with_domain_and_creds
AuthenticationLoginEventMethods.endpoint_callable = authentication_login_with_domain_and_creds_endpoint
AuthenticationSelectEventMethods = MethodToEvent(
name="AuthenticationSelectEventMethods",

View File

@@ -1,7 +1,9 @@
from pydantic import BaseModel
from ApiLayers.ApiValidations.Request import (
Login,
)
class LoginSuperUserRequestModel(BaseModel):
class LoginSuperUserRequestModel(Login):
pass