Skip to content

Compatible with authentication versions below 3.3.0#115

Closed
tzfun wants to merge 1 commit into
etcdv3:masterfrom
tzfun:master
Closed

Compatible with authentication versions below 3.3.0#115
tzfun wants to merge 1 commit into
etcdv3:masterfrom
tzfun:master

Conversation

@tzfun

@tzfun tzfun commented Dec 4, 2025

Copy link
Copy Markdown

More detail see issue #114

Signed-off-by: beifengtz <beifengtz@qq.com>
Comment thread src/auth.rs
if let Some(token) = self.token.read_unpoisoned().as_ref() {
request.headers_mut().insert(AUTHORIZATION, token.clone());
// Compatible with authentication versions below 3.3.0 (excluding 3.3.0). In older versions, the header key is 'token'.
request.headers_mut().insert("token", token.clone());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @tzfun

I have made a similar change in #106, but not merged yet.

I prefer to use token to replace authorization header instead of keeping both.

In etcd server, they use token as the for GRPC auth header, authorization is a compatible fallback (Swagger header). And furthermore, in etcd grpcproxy mode, it only uses token.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, you can ignore this PR now. I'm looking forward to the new version release. 👍

@belltoy belltoy force-pushed the master branch 2 times, most recently from 9a46eb1 to 2e99c37 Compare January 7, 2026 04:23
@belltoy

belltoy commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Close due to #106 has merged

@belltoy belltoy closed this Jan 7, 2026
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