-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[Rust-Axum] Implement support for Basic and Bearer auth in Claims #20584
[Rust-Axum] Implement support for Basic and Bearer auth in Claims #20584
Conversation
51f6e61
to
73be821
Compare
14a8e95
to
a181f49
Compare
+ apis::ApiAuthBasic<Claims = C> | ||
+ apis::ApiAuthBasic<Claims = C> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is odd, but it works. This happens if both a basic and bearer auth are defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let make it up later. We can if else in mustache to ensure that only one trait is rendered
if no feedback from anyone, i'll merge it on coming Wed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry for late review as I was super busy with my job!
+ apis::ApiAuthBasic<Claims = C> | ||
+ apis::ApiAuthBasic<Claims = C> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let make it up later. We can if else in mustache to ensure that only one trait is rendered
@linxGnu thanks for reviewing the change when you've time, can you please PM me via Slack? |
This PR creates a new
ApiAuthBasic
Claim trait that is used for basic and bearer authorization.An example implementation looks like this:
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples, as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)