mahongran
dd5f680161
refactor: enhance WorkAccessToken to improve cache key handling
...
- 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.
2025-01-03 18:22:44 +08:00
mahongran
988ea49a03
feat: enhance WorkAccessToken to include AgentID for improved token management
...
- 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.
2025-01-03 14:13:06 +08:00
yangyl12345
a571bf3546
Update default_access_token.go ( #805 )
...
* Update default_access_token.go
微信获取稳定版token,只有不等于空字符串的情况下才会返回access_token信息,未空的情况,继续调去微信服务
* 微信稳定性获取 access_token 接口,添加防止并发性获取 access_token 和多次微信服务获取代码
---------
Co-authored-by: w_yangyili <w_yangyili@xiwang.com >
2024-11-26 12:13:49 +08:00
Jiaxi_Wu
5b29289dbb
fix: 修复缓存失效时,可能会重复获取accessToken的问题 ( #762 )
...
* fix: 修复缓存失效时,可能会重复获取accessToken的问题
* feat: 添加获取AK失败时的错误信息返回
---------
Co-authored-by: wujiaxi <wujiaxi@expandera.cn >
2024-01-12 19:23:09 +08:00
leonard627
0ffe34187a
fix:compatibility cache expiration returns empty string issue ( #742 )
2023-11-02 09:42:17 +08:00
markwang
49c4cfaf54
fix:GetAccessTokenContext从cache中获取字符窜为空时,从微信服务器获取 ( #721 )
...
Co-authored-by: markwang <www.wang61@qq.com >
2023-09-24 10:47:43 +08:00
welllog
8821a3856d
feat: 获取稳定版接口调用凭据 ( #669 )
...
* feat: 获取稳定版接口调用凭据
* Update default_access_token.go
* fix: format code
---------
Co-authored-by: ctr <orinfy@foxmail.com >
Co-authored-by: houseme <housemecn@gmail.com >
2023-04-18 11:54:34 +08:00
okhowang
5380d5bee7
GetAccessToken支持Context ( #618 )
2022-09-29 14:33:53 +08:00
houseme
96c1f98944
[feature] Format the code and improve Mini Program authorization to o… ( #473 )
...
* [feature] Format the code and improve Mini Program authorization to obtain openid(miniprogram/auth/auth.go Code2Session)
* [feature] CheckEncryptedData (https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/user-info/auth.checkEncryptedData.html )
* upgrade json error
* upgrade json error
Co-authored-by: houseme <houseme@outlook.com >
2021-09-08 11:03:23 +08:00
浩
80d91d8316
使用双检锁优化 Token 获取 ( #444 )
2021-08-26 10:34:24 +08:00
从小就很酷
c1e4e2c9d0
增加企业微信 企业内部开发模块 ( #418 )
...
* 增加小程序内容安全接口
* 内容安全接口 按照golint规范进行优化
* 内容安全接口 按照golint规范进行优化
* 删除CheckImage中的输出代码
* 小程序内容安全接口
* 小程序内容安全接口
* 小程序内容安全接口
1:修改返回值 改为error异常统一返回
* 增加企业微信 企业内部开发模块
1:授权登录
* 增加企业微信 企业内部开发模块
* 修改参数为小写
* 优化参数格式
Co-authored-by: root <admin@example.com >
2021-07-16 10:28:54 +08:00
silenceper
868b31cb3d
fix golangci-lint failed ( #284 )
...
* fix golangci-lint error
2020-06-24 14:36:33 +08:00
silenceper
58092a21de
testCase:使用gock模拟http接口数据
2020-05-25 23:27:24 +08:00
silenceper
972dec0406
将小程序获取ak的方式也抽象出来
2020-05-25 22:00:51 +08:00
silenceper
b599e93c5b
将获取AccessToken和jsTicket单独抽象为interface
2020-05-25 21:55:42 +08:00