Skip to content
New issue

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

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

Already on GitHub? # to your account

Nacos-client missing accessToken sometime. #12509

Closed
liqipeng opened this issue Aug 17, 2024 · 0 comments
Closed

Nacos-client missing accessToken sometime. #12509

liqipeng opened this issue Aug 17, 2024 · 0 comments

Comments

@liqipeng
Copy link
Contributor

Describe the bug
nacos-client missing accessToken sometime. ( nacos-client 偶发accessToken导致接口认证失败。 )
nacos-client version: 2.x

Reason
com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl#login

                        loginIdentityContext = new LoginIdentityContext(); // 新赋值了空Context (空对象会立即被其他线程读取到,引发问题)
                        loginIdentityContext.setParameter(NacosAuthLoginConstant.ACCESSTOKEN,
                                    identityContext.getParameter(NacosAuthLoginConstant.ACCESSTOKEN));  // 再给Context设置参数
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants