-
Notifications
You must be signed in to change notification settings - Fork 288
feat: allow users to specify a custom header not defined in the struct #420
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
Conversation
jayakasadev
commented
Feb 24, 2025
•
edited
Loading
edited
- allow users to specify custom header values for token generation
- remove deprecated verify_slices_are_equal
- update tests
@jayakasadev , what is the use case for this? |
I have a client which requires that I pass in some custom headers in the token. The |
@jayakasadev , are those headers essential to decoding and validating the token? |
example: https://docs.cdp.coinbase.com/advanced-trade/docs/ws-auth |
@Keats , looks like there is an uncommon, but legit use case for this. |
@rimutaka let me know what changes are needed |
Looks like clippy/cargo fmt needs to be ran |
@jayakasadev , word of caution, I am not a maintainer, so feel free to ignore. The final word is with @Keats. |
understood. I wanted to ask if using a |
I went ahead and implemented the trait approach in a separate branch in case let me know if this approach is more desirable. The usage of |
Immediate thoughts: it's a breaking change and not sure if the existing tests cover all the affected parts. |
understood, im fine abandoning that approach if the performance regression is tolerable
this is on macos arm64 |
clippy is broken with
I can look into fixing it in this pr, a separate one or mark it as ignored. |
@jayakasadev , I'm not a maintainer and I'm not sure how much Vincent trusts my reviews :) |
thanks @rimutaka |
@Keats thanks for approving |
This is merged but since it's technically a breaking change, I'll wait a bit before releasing it |