glchat-plugin 0.2.7__py3-none-any.whl → 0.2.9__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.
- glchat_plugin/handler/__init__.py +1 -0
- glchat_plugin/handler/base_post_login_handler.py +70 -0
- {glchat_plugin-0.2.7.dist-info → glchat_plugin-0.2.9.dist-info}/METADATA +2 -2
- {glchat_plugin-0.2.7.dist-info → glchat_plugin-0.2.9.dist-info}/RECORD +6 -4
- {glchat_plugin-0.2.7.dist-info → glchat_plugin-0.2.9.dist-info}/WHEEL +0 -0
- {glchat_plugin-0.2.7.dist-info → glchat_plugin-0.2.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Module for glchat_plugin handler."""
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Provides a base class for post login handlers.
|
|
2
|
+
|
|
3
|
+
Authors:
|
|
4
|
+
Ricky Setiawan (ricky.setiawan@gdplabs.id)
|
|
5
|
+
|
|
6
|
+
References:
|
|
7
|
+
NONE
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from abc import ABC, abstractmethod
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BasePostLoginHandler(ABC):
|
|
15
|
+
"""A base class for post login handlers.
|
|
16
|
+
|
|
17
|
+
This interface defines the contract for handling post-authentication login flows.
|
|
18
|
+
Implementations can customize user validation, data mapping, team assignment,
|
|
19
|
+
and other login-related logic for different environments.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
@abstractmethod
|
|
23
|
+
async def handle_post_oauth_login(self, stackauth_user: Any, tenant_id: str, **kwargs: Any) -> Any:
|
|
24
|
+
"""Handle post OAuth login flow.
|
|
25
|
+
|
|
26
|
+
This method is called after a successful OAuth authentication to complete
|
|
27
|
+
the login process. It should handle user validation, team assignment,
|
|
28
|
+
user data upsert, and return the appropriate user object.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
stackauth_user (Any): Authenticated user object from StackAuth containing
|
|
32
|
+
user information from the OAuth provider.
|
|
33
|
+
tenant_id (str): Tenant identifier for multi-tenant applications.
|
|
34
|
+
**kwargs (Any): Additional keyword arguments for extensibility.
|
|
35
|
+
May contain request context, services, or other dependencies.
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
Any: Current user object for the frontend session containing
|
|
39
|
+
user information, roles, permissions, and tenant data.
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
NotImplementedError: If the method is not implemented.
|
|
43
|
+
HTTPException: If user validation or processing fails.
|
|
44
|
+
"""
|
|
45
|
+
raise NotImplementedError
|
|
46
|
+
|
|
47
|
+
@abstractmethod
|
|
48
|
+
async def handle_post_credential_login(self, stackauth_user: Any, tenant_id: str, **kwargs: Any) -> Any:
|
|
49
|
+
"""Handle post credential (username/password) login flow.
|
|
50
|
+
|
|
51
|
+
This method is called after a successful credential-based authentication
|
|
52
|
+
to complete the login process. It should fetch existing user data,
|
|
53
|
+
validate permissions, and return the appropriate user object.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
stackauth_user (Any): Authenticated user object from StackAuth containing
|
|
57
|
+
user information from credential authentication.
|
|
58
|
+
tenant_id (str): Tenant identifier for multi-tenant applications.
|
|
59
|
+
**kwargs (Any): Additional keyword arguments for extensibility.
|
|
60
|
+
May contain request context, services, or other dependencies.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Any: Current user object for the frontend session containing
|
|
64
|
+
user information, roles, permissions, and tenant data.
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
NotImplementedError: If the method is not implemented.
|
|
68
|
+
HTTPException: If user validation or processing fails.
|
|
69
|
+
"""
|
|
70
|
+
raise NotImplementedError
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: glchat-plugin
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Author-email: GenAI SDK Team <gat-sdk@gdplabs.id>
|
|
5
5
|
Requires-Python: <3.13,>=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
Requires-Dist: poetry>=2.1.3
|
|
8
|
-
Requires-Dist: bosa-core-binary>=0.
|
|
8
|
+
Requires-Dist: bosa-core-binary>=0.8.4
|
|
9
9
|
Requires-Dist: gllm-core-binary>=0.3.0
|
|
10
10
|
Requires-Dist: gllm-inference-binary>=0.5.0
|
|
11
11
|
Requires-Dist: gllm-pipeline-binary>=0.4.0
|
|
@@ -4,6 +4,8 @@ glchat_plugin/config/app_config.py,sha256=9_ShYtaQ7Rp14sSkrIFLoOAMlbwVlm13EuCxzO
|
|
|
4
4
|
glchat_plugin/config/constant.py,sha256=yyHkEAtv0uF-B-ip6Qwr3MHOv_LQ-D5beZ7FiLzlaRU,1095
|
|
5
5
|
glchat_plugin/context/__init__.py,sha256=3Wx_apMIS6z-m6eRs6hoyOsJFLJfKmMFOkrPDkPQfJI,40
|
|
6
6
|
glchat_plugin/context/context_manager.py,sha256=0lhO0w_hd5dUdIEJQ2LOJFZsgpzitQU_aPZfTfQK3vw,1302
|
|
7
|
+
glchat_plugin/handler/__init__.py,sha256=H5DJaAfwwtRsvMcOaEzHfGMQk25H7la0E7uPfksWtoQ,40
|
|
8
|
+
glchat_plugin/handler/base_post_login_handler.py,sha256=48xSbe_LwTCjRY-lCuzWXqbnEr1ql8bAhQih1Xeh8f8,2835
|
|
7
9
|
glchat_plugin/pipeline/__init__.py,sha256=Sk-NfIGyA9VKIg0Bt5OHatNUYyWVPh9i5xhE5DFAfbo,41
|
|
8
10
|
glchat_plugin/pipeline/base_pipeline_preset_config.py,sha256=2DxJlroZ_tvVO6DYo1R07cjhWgKQJpysw1GsJ3BNRnw,1100
|
|
9
11
|
glchat_plugin/pipeline/pipeline_handler.py,sha256=vDvIPI7Y39K_DI3jvQZsXC9YzQLUI4TuC-boyasdey8,24405
|
|
@@ -17,7 +19,7 @@ glchat_plugin/storage/base_anonymizer_storage.py,sha256=oFwovWrsjM7v1YjeN-4p-M3O
|
|
|
17
19
|
glchat_plugin/storage/base_chat_history_storage.py,sha256=JvUUFMu_9jRBQ9yug_x7S4rQjZEA1vM5ombDvz-7zCE,11095
|
|
18
20
|
glchat_plugin/tools/__init__.py,sha256=OFotHbgQ8mZEbdlvlv5aVMdxfubPvkVWAcTwhIPdIqQ,542
|
|
19
21
|
glchat_plugin/tools/decorators.py,sha256=AvQBV18wzXWdC483RSSmpfh92zsqTyp8SzDLIkreIGU,3925
|
|
20
|
-
glchat_plugin-0.2.
|
|
21
|
-
glchat_plugin-0.2.
|
|
22
|
-
glchat_plugin-0.2.
|
|
23
|
-
glchat_plugin-0.2.
|
|
22
|
+
glchat_plugin-0.2.9.dist-info/METADATA,sha256=BBTe7j1LPHl4MTwaMXB0bIvFmEmJdKCj2nAtAv385yk,2063
|
|
23
|
+
glchat_plugin-0.2.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
glchat_plugin-0.2.9.dist-info/top_level.txt,sha256=fzKSXmct5dY4CAKku4-mkdHX-QPAyQVvo8vpQj8qizY,14
|
|
25
|
+
glchat_plugin-0.2.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|