nc-user-terminator 0.1.9__py3-none-any.whl → 0.1.11__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.
Potentially problematic release.
This version of nc-user-terminator might be problematic. Click here for more details.
- nc_user_manager/client.py +4 -1
- nc_user_manager/models.py +4 -4
- {nc_user_terminator-0.1.9.dist-info → nc_user_terminator-0.1.11.dist-info}/METADATA +5 -1
- nc_user_terminator-0.1.11.dist-info/RECORD +10 -0
- nc_user_terminator-0.1.9.dist-info/RECORD +0 -10
- {nc_user_terminator-0.1.9.dist-info → nc_user_terminator-0.1.11.dist-info}/WHEEL +0 -0
- {nc_user_terminator-0.1.9.dist-info → nc_user_terminator-0.1.11.dist-info}/top_level.txt +0 -0
nc_user_manager/client.py
CHANGED
|
@@ -232,7 +232,10 @@ class OAuthClient:
|
|
|
232
232
|
headers = self._headers({"Authorization": f"Bearer {token}"})
|
|
233
233
|
res_dict = await self._arequest("GET", f"{self._base_url}/api/me", headers=headers)
|
|
234
234
|
if res_dict.get("success", True):
|
|
235
|
-
|
|
235
|
+
if self._async_cache:
|
|
236
|
+
await self._cache_user_async(token, res_dict)
|
|
237
|
+
else:
|
|
238
|
+
self._cache_user(token, res_dict)
|
|
236
239
|
|
|
237
240
|
return UserResponse(res_dict)
|
|
238
241
|
|
nc_user_manager/models.py
CHANGED
|
@@ -15,8 +15,8 @@ class UserResponse(dict):
|
|
|
15
15
|
return self.get("email")
|
|
16
16
|
|
|
17
17
|
@property
|
|
18
|
-
def
|
|
19
|
-
return self.get("
|
|
18
|
+
def avatar(self) -> Optional[str]:
|
|
19
|
+
return self.get("avatar")
|
|
20
20
|
|
|
21
21
|
@property
|
|
22
22
|
def full_name(self) -> Optional[str]:
|
|
@@ -44,5 +44,5 @@ class CallbackResponse(dict):
|
|
|
44
44
|
return self.get("email")
|
|
45
45
|
|
|
46
46
|
@property
|
|
47
|
-
def
|
|
48
|
-
return self.get("
|
|
47
|
+
def avatar(self) -> str:
|
|
48
|
+
return self.get("avatar")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nc-user-terminator
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.11
|
|
4
4
|
Summary: OAuth client wrapper for multi-tenant projects
|
|
5
5
|
Author: bw_song
|
|
6
6
|
Author-email: m132777096902@gmail.com
|
|
@@ -21,3 +21,7 @@ Dynamic: requires-python
|
|
|
21
21
|
- 调整相对路径
|
|
22
22
|
+ v0.1.9
|
|
23
23
|
- 修改缓存配置
|
|
24
|
+
+ v0.1.10
|
|
25
|
+
- 获取用户信息,本地缓存配置
|
|
26
|
+
+ v0.1.11
|
|
27
|
+
- 用户头像字段调整
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
nc_user_manager/__init__.py,sha256=fF3FZD0XUW5YCfTbBeJs3RK-Mnm3IQ7lns6Eb_tMqPU,238
|
|
2
|
+
nc_user_manager/cache.py,sha256=u9ioXDwHmEJHRB4VKI4JU_pp-8Y5O4bLPm8-pwqiMVc,2273
|
|
3
|
+
nc_user_manager/client.py,sha256=TrRM3GPg6FCRDUlC2W4rvyzWzNeXRmtp4zUWhz8ouWk,11330
|
|
4
|
+
nc_user_manager/exceptions.py,sha256=yUMDrh1HHZF36UUadQNHvJlDgEYSYoYOObs8Q11fjrE,351
|
|
5
|
+
nc_user_manager/models.py,sha256=r3OmicvfeDtDyvFlfxhn-g0svAvyeXIwa1BEuCMx4Ns,1074
|
|
6
|
+
nc_user_manager/utils.py,sha256=gxFSaUq0oiymIlvHITu2L7EkU2ZYQmW2q_okmUxGBeU,2319
|
|
7
|
+
nc_user_terminator-0.1.11.dist-info/METADATA,sha256=Z5NfbEqefb5bA-Viz_Fpb_3VCPzHhUNC6QrpmsgiEK0,602
|
|
8
|
+
nc_user_terminator-0.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
nc_user_terminator-0.1.11.dist-info/top_level.txt,sha256=kOAUtl6RYo-x3vMJL8It3KCJLoIFPvMUiAAyXjPQTYA,16
|
|
10
|
+
nc_user_terminator-0.1.11.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
nc_user_manager/__init__.py,sha256=fF3FZD0XUW5YCfTbBeJs3RK-Mnm3IQ7lns6Eb_tMqPU,238
|
|
2
|
-
nc_user_manager/cache.py,sha256=u9ioXDwHmEJHRB4VKI4JU_pp-8Y5O4bLPm8-pwqiMVc,2273
|
|
3
|
-
nc_user_manager/client.py,sha256=BEryWh_uooiSDZaLeKokawKG7U_hWB1mA9-fwVUSWrI,11221
|
|
4
|
-
nc_user_manager/exceptions.py,sha256=yUMDrh1HHZF36UUadQNHvJlDgEYSYoYOObs8Q11fjrE,351
|
|
5
|
-
nc_user_manager/models.py,sha256=mDK7zskIcaThxvUUTWVf6eMasw7YaA3hDGVVSd1ZJgo,1088
|
|
6
|
-
nc_user_manager/utils.py,sha256=gxFSaUq0oiymIlvHITu2L7EkU2ZYQmW2q_okmUxGBeU,2319
|
|
7
|
-
nc_user_terminator-0.1.9.dist-info/METADATA,sha256=8bfDGjP5d-D94vpspEoA1hq_TmYAng--GEhzWBTwwKs,506
|
|
8
|
-
nc_user_terminator-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
nc_user_terminator-0.1.9.dist-info/top_level.txt,sha256=kOAUtl6RYo-x3vMJL8It3KCJLoIFPvMUiAAyXjPQTYA,16
|
|
10
|
-
nc_user_terminator-0.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|