2222- WorkloadTokenManager: Manages workload access tokens with caching
2323- AuthRequestProcessor: Handles OAuth2 flows in agent conversations
2424
25- Example usage:
26- from veadk.integrations.ve_identity import VeIdentityFunctionTool
27-
28- @VeIdentityFunctionTool(
29- provider_name="github",
30- scopes=["repo", "user"],
31- auth_flow="USER_FEDERATION",
25+ Examples:
26+ from veadk.integrations.ve_identity import (
27+ VeIdentityFunctionTool,
28+ oauth2_auth,
3229 )
30+
3331 async def get_github_repos(access_token: str):
3432 # Tool implementation
3533 pass
34+
35+ tool = VeIdentityFunctionTool(
36+ func=get_github_repos,
37+ auth_config=oauth2_auth(
38+ provider_name="github",
39+ scopes=["repo", "user"],
40+ auth_flow="USER_FEDERATION",
41+ ),
42+ into="access_token",
43+ )
3644"""
3745
38- from .auth_processor import (
46+ from veadk . integrations . ve_identity .auth_processor import (
3947 AuthRequestConfig ,
4048 AuthRequestProcessor ,
4149 _NoOpAuthProcessor ,
@@ -46,7 +54,7 @@ async def get_github_repos(access_token: str):
4654)
4755
4856# New unified tools
49- from .auth_config import (
57+ from veadk . integrations . ve_identity .auth_config import (
5058 api_key_auth ,
5159 oauth2_auth ,
5260 workload_auth ,
@@ -55,16 +63,19 @@ async def get_github_repos(access_token: str):
5563 WorkloadAuthConfig ,
5664 VeIdentityAuthConfig ,
5765)
58- from .function_tool import VeIdentityFunctionTool
59- from .mcp_tool import VeIdentityMcpTool
60- from .mcp_toolset import VeIdentityMcpToolset
61- from .identity_client import IdentityClient
62- from .models import (
66+ from veadk . integrations . ve_identity .function_tool import VeIdentityFunctionTool
67+ from veadk . integrations . ve_identity .mcp_tool import VeIdentityMcpTool
68+ from veadk . integrations . ve_identity .mcp_toolset import VeIdentityMcpToolset
69+ from veadk . integrations . ve_identity .identity_client import IdentityClient
70+ from veadk . integrations . ve_identity .models import (
6371 OAuth2TokenResponse ,
6472 OAuth2AuthPoller ,
6573 WorkloadToken ,
6674)
67- from .token_manager import WorkloadTokenManager , get_workload_token
75+ from veadk .integrations .ve_identity .token_manager import (
76+ WorkloadTokenManager ,
77+ get_workload_token ,
78+ )
6879
6980__all__ = [
7081 # Client
0 commit comments