Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance WorkAccessToken to include AgentID for improved token m… #809

Closed
wants to merge 2 commits into from

Conversation

mahongran
Copy link

…anagement

  • Added AgentID field to WorkAccessToken struct.
  • Updated NewWorkAccessToken function to accept AgentID as a parameter.
  • Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.

This change improves the handling of access tokens in a multi-agent environment.

…anagement

- Added AgentID field to WorkAccessToken struct.
- Updated NewWorkAccessToken function to accept AgentID as a parameter.
- Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.

This change improves the handling of access tokens in a multi-agent environment.
@houseme
Copy link
Collaborator

houseme commented Jan 3, 2025

需要兼容一下历史版本,以及提供一下官方文档

- Updated the AgentID field in WorkAccessToken struct to clarify its optional nature for distinguishing applications.
- Modified the access token cache key construction to support both new and legacy formats based on the presence of AgentID.
- Added comments for better understanding of the cache key logic and its compatibility with historical versions.

This change improves the flexibility and clarity of access token management in multi-agent scenarios.
@mahongran
Copy link
Author

mahongran commented Jan 3, 2025

需要兼容一下历史版本,以及提供一下官方文档

https://developer.work.weixin.qq.com/document/path/91039

@mahongran mahongran closed this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants