xn-auth 0.2.53__py3-none-any.whl → 0.2.55__py3-none-any.whl

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.
x_auth/controller.py CHANGED
@@ -56,7 +56,8 @@ class Auth:
56
56
  {
57
57
  **user.model_dump(),
58
58
  "xid": db_user.id,
59
- "pub": db_user.pub and b64encode(db_user.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
  ),
x_auth/middleware.py CHANGED
@@ -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
x_auth/types.py CHANGED
@@ -68,4 +68,5 @@ class TgUser(Xs):
68
68
 
69
69
  class XyncUser(WebAppUser):
70
70
  xid: int
71
- pub: bytes | None
71
+ pub: bytes
72
+ prv: bytes | None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xn-auth
3
- Version: 0.2.53
3
+ Version: 0.2.55
4
4
  Summary: Auth adapter for XN-Api framework
5
5
  Author-email: Artemiev <mixartemev@gmail.com>
6
6
  License: MIT
@@ -0,0 +1,10 @@
1
+ x_auth/controller.py,sha256=6AMvrhfW_2UEZhx4f9xFT0EC9YVNsS2tY4Lf8867VVU,3862
2
+ x_auth/enums.py,sha256=pciVrb92S9YQFMhHe6pKNYwcvtevwfMXIiG1WxAEa-Q,761
3
+ x_auth/exceptions.py,sha256=2B4okJxhPyNqTJXlSTfblJUQJ60bLGXdgJIu6ue7S6w,162
4
+ x_auth/middleware.py,sha256=KLRv60Ih1a4yobn-jcjysV-m0i5tu0bKKlpcaC3Ghbs,2984
5
+ x_auth/models.py,sha256=V3lvrUVtS5viyqO_-Y7u2zQep5bRjPOpWmc5kweMrN0,9211
6
+ x_auth/types.py,sha256=MD7wDLZ2Lf_G2LWeyZEPaY1zSaz3atn4JYGk4cFjZ74,1529
7
+ xn_auth-0.2.55.dist-info/METADATA,sha256=xgbgLpgaZM_43TyDet3XrXgzE1jEk9rCONEfR2MxvG8,823
8
+ xn_auth-0.2.55.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
9
+ xn_auth-0.2.55.dist-info/top_level.txt,sha256=ydMDkzxgQPtW-E_MNDfUAroAFZvWSqU-x_kZSA7NSFo,7
10
+ xn_auth-0.2.55.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- x_auth/controller.py,sha256=5tBqq_7OGUwHOtCZlE1ROeAxN-qCdA_5D7ti971AmDo,3807
2
- x_auth/enums.py,sha256=pciVrb92S9YQFMhHe6pKNYwcvtevwfMXIiG1WxAEa-Q,761
3
- x_auth/exceptions.py,sha256=2B4okJxhPyNqTJXlSTfblJUQJ60bLGXdgJIu6ue7S6w,162
4
- x_auth/middleware.py,sha256=JfssQomDv0J_69GfS2a_2_uyRzs26zSY6IW1Vk7m8K0,2900
5
- x_auth/models.py,sha256=V3lvrUVtS5viyqO_-Y7u2zQep5bRjPOpWmc5kweMrN0,9211
6
- x_auth/types.py,sha256=xVi1A8CrGfdfS2HbaxX-X3lEJWH_1TvTk-u8TeqKzQg,1514
7
- xn_auth-0.2.53.dist-info/METADATA,sha256=Ad_6OdMH_OK5vDXBHk-CoG6vfE0makkqb6KjJgTf8Js,823
8
- xn_auth-0.2.53.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- xn_auth-0.2.53.dist-info/top_level.txt,sha256=ydMDkzxgQPtW-E_MNDfUAroAFZvWSqU-x_kZSA7NSFo,7
10
- xn_auth-0.2.53.dist-info/RECORD,,