xn-auth 0.2.53__tar.gz → 0.2.55__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xn_auth-0.2.53/xn_auth.egg-info → xn_auth-0.2.55}/PKG-INFO +1 -1
- {xn_auth-0.2.53 → xn_auth-0.2.55}/x_auth/controller.py +2 -1
- {xn_auth-0.2.53 → xn_auth-0.2.55}/x_auth/middleware.py +3 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/x_auth/types.py +2 -1
- {xn_auth-0.2.53 → xn_auth-0.2.55/xn_auth.egg-info}/PKG-INFO +1 -1
- {xn_auth-0.2.53 → xn_auth-0.2.55}/.env.dist +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/.gitignore +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/.pre-commit-config.yaml +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/README.md +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/makefile +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/pyproject.toml +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/setup.cfg +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/x_auth/enums.py +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/x_auth/exceptions.py +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/x_auth/models.py +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/xn_auth.egg-info/SOURCES.txt +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/xn_auth.egg-info/dependency_links.txt +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/xn_auth.egg-info/requires.txt +0 -0
- {xn_auth-0.2.53 → xn_auth-0.2.55}/xn_auth.egg-info/top_level.txt +0 -0
|
@@ -56,7 +56,8 @@ class Auth:
|
|
|
56
56
|
{
|
|
57
57
|
**user.model_dump(),
|
|
58
58
|
"xid": db_user.id,
|
|
59
|
-
"pub":
|
|
59
|
+
"pub": b64encode(db_user.pub),
|
|
60
|
+
"prv": db_user.prv and b64encode(db_user.prv),
|
|
60
61
|
"allows_write_to_pm": user.allows_write_to_pm or not db_user.blocked,
|
|
61
62
|
}
|
|
62
63
|
),
|
|
@@ -62,6 +62,9 @@ class JWTAuthMiddleware(JWTCookieAuthenticationMiddleware):
|
|
|
62
62
|
# noinspection PyUnresolvedReferences
|
|
63
63
|
scope["state"]["_ls_connection_state"].headers = Headers({"authorization": "Bearer " + uet})
|
|
64
64
|
await super().__call__(scope, receive, send_wrapper)
|
|
65
|
+
except Exception as e:
|
|
66
|
+
logging.error(scope)
|
|
67
|
+
raise e
|
|
65
68
|
# except NotAuthorizedException as e:
|
|
66
69
|
# if e.detail == "No JWT token found in request header or cookies" and e.status_code == 401:
|
|
67
70
|
# return e
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|