events updated
This commit is contained in:
@@ -283,8 +283,8 @@ class AuthenticationCheckTokenEventMethods(MethodToEvent):
|
||||
|
||||
@classmethod
|
||||
def authentication_login_with_domain_and_creds(
|
||||
cls,
|
||||
request,
|
||||
cls,
|
||||
request,
|
||||
):
|
||||
if get_object_via_access_key(request=request):
|
||||
return JSONResponse(
|
||||
@@ -306,8 +306,8 @@ class AuthenticationRefreshEventMethods(MethodToEvent):
|
||||
|
||||
@classmethod
|
||||
def authentication_refresh_user_info(
|
||||
cls,
|
||||
request,
|
||||
cls,
|
||||
request,
|
||||
):
|
||||
access_token = str(request.headers.get(Auth.ACCESS_TOKEN_TAG))
|
||||
if token_user := get_object_via_access_key(request=request):
|
||||
@@ -350,7 +350,7 @@ class AuthenticationChangePasswordEventMethods(MethodToEvent):
|
||||
def authentication_change_password(
|
||||
cls,
|
||||
data: ChangePassword,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection]
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
):
|
||||
if token_dict.user_type == 1:
|
||||
if found_user := Users.filter_one(
|
||||
@@ -388,8 +388,8 @@ class AuthenticationCreatePasswordEventMethods(MethodToEvent):
|
||||
|
||||
@classmethod
|
||||
def authentication_create_password(
|
||||
cls,
|
||||
data: CreatePassword,
|
||||
cls,
|
||||
data: CreatePassword,
|
||||
):
|
||||
if not data.re_password == data.password:
|
||||
raise HTTPException(
|
||||
@@ -560,9 +560,9 @@ class AuthenticationRefreshTokenEventMethods(MethodToEvent):
|
||||
@classmethod
|
||||
def authentication_refresher_token(
|
||||
cls,
|
||||
request: Request,
|
||||
data: Remember,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
request: Request,
|
||||
data: Remember,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
):
|
||||
token_refresher = UsersTokens.filter_by_one(
|
||||
system=True, token=data.refresh_token, domain=data.domain
|
||||
@@ -630,10 +630,10 @@ class AuthenticationForgotPasswordEventMethods(MethodToEvent):
|
||||
|
||||
@classmethod
|
||||
def authentication_forgot_password(
|
||||
cls,
|
||||
request: Request,
|
||||
data: Forgot,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
cls,
|
||||
request: Request,
|
||||
data: Forgot,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
):
|
||||
found_user: Users = Users.check_user_exits(
|
||||
access_key=data.access_key, domain=data.domain
|
||||
@@ -692,10 +692,10 @@ class AuthenticationDownloadAvatarEventMethods(MethodToEvent):
|
||||
|
||||
@classmethod
|
||||
def authentication_download_avatar(
|
||||
cls,
|
||||
request: Request,
|
||||
data: Forgot,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
cls,
|
||||
request: Request,
|
||||
data: Forgot,
|
||||
token_dict: typing.Union[EmployeeSelection, OccupantSelection],
|
||||
):
|
||||
found_user = Users.check_user_exits(
|
||||
access_key=data.access_key, domain=data.domain
|
||||
|
||||
Reference in New Issue
Block a user