nc-user-terminator 0.1.5__tar.gz → 0.1.6__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.
Potentially problematic release.
This version of nc-user-terminator might be problematic. Click here for more details.
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/PKG-INFO +3 -1
- nc_user_terminator-0.1.6/README.md +5 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_manager/client.py +6 -10
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/PKG-INFO +3 -1
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/pyproject.toml +1 -1
- nc_user_terminator-0.1.5/README.md +0 -3
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_manager/__init__.py +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_manager/cache.py +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_manager/exceptions.py +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_manager/models.py +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_manager/utils.py +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/SOURCES.txt +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/dependency_links.txt +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/requires.txt +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/top_level.txt +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/setup.cfg +0 -0
- {nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nc-user-terminator
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: OAuth client wrapper for multi-tenant projects
|
|
5
5
|
Author: bw_song
|
|
6
6
|
Author-email: m132777096902@gmail.com
|
|
@@ -13,3 +13,5 @@ Dynamic: requires-python
|
|
|
13
13
|
# 更新
|
|
14
14
|
+ V0.1.5
|
|
15
15
|
- 新增本地缓存机制
|
|
16
|
+
+ v0.1.6
|
|
17
|
+
- 默认连接地址
|
|
@@ -14,7 +14,7 @@ DEFAULT_TTL = 3600
|
|
|
14
14
|
class OAuthClient:
|
|
15
15
|
def __init__(
|
|
16
16
|
self,
|
|
17
|
-
base_url: str,
|
|
17
|
+
base_url: Optional[str],
|
|
18
18
|
product_code: str,
|
|
19
19
|
redirect_url: Optional[str] = None,
|
|
20
20
|
single_session: bool = False,
|
|
@@ -28,6 +28,8 @@ class OAuthClient:
|
|
|
28
28
|
:param redirect_url: 可选,重定向地址
|
|
29
29
|
:param single_session: 是否单会话登录
|
|
30
30
|
"""
|
|
31
|
+
if not base_url:
|
|
32
|
+
base_url = "http://172.27.92.74"
|
|
31
33
|
self._base_url = base_url.rstrip("/")
|
|
32
34
|
self._product_code = product_code
|
|
33
35
|
self._redirect_url = redirect_url
|
|
@@ -277,17 +279,11 @@ async def main():
|
|
|
277
279
|
|
|
278
280
|
redis_cache = AsyncRedisCache(_redis)
|
|
279
281
|
|
|
280
|
-
client = OAuthClient("http://
|
|
281
|
-
|
|
282
|
-
|
|
282
|
+
client = OAuthClient("http://auth.nc.com/", "bankgpt", "http://localhost:8000/auth/google/custom_callback", single_session=True, cache=redis_cache)
|
|
283
|
+
authorize = client.authorize("google")
|
|
284
|
+
print(authorize)
|
|
283
285
|
|
|
284
286
|
|
|
285
|
-
name = await client.say_my_name_async("Tu72u4SVue4ezadi1v5Ui9r9HjxH7YqbkY_yf5jFtPQ")
|
|
286
|
-
print(name)
|
|
287
|
-
name = await client.say_my_name_async("Tu72u4SVue4ezadi1v5Ui9r9HjxH7YqbkY_yf5jFtPQ")
|
|
288
|
-
print(name)
|
|
289
|
-
name = await client.logout_async("Tu72u4SVue4ezadi1v5Ui9r9HjxH7YqbkY_yf5jFtPQ")
|
|
290
|
-
print(name)
|
|
291
287
|
|
|
292
288
|
|
|
293
289
|
if __name__ == '__main__':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nc-user-terminator
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: OAuth client wrapper for multi-tenant projects
|
|
5
5
|
Author: bw_song
|
|
6
6
|
Author-email: m132777096902@gmail.com
|
|
@@ -13,3 +13,5 @@ Dynamic: requires-python
|
|
|
13
13
|
# 更新
|
|
14
14
|
+ V0.1.5
|
|
15
15
|
- 新增本地缓存机制
|
|
16
|
+
+ v0.1.6
|
|
17
|
+
- 默认连接地址
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/requires.txt
RENAMED
|
File without changes
|
{nc_user_terminator-0.1.5 → nc_user_terminator-0.1.6}/nc_user_terminator.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|