-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(jwt-auth): support configuring key_claim_name
#11282
base: master
Are you sure you want to change the base?
Conversation
Features: - config param "key_claim_name" (default = "key"), so for example one could use "iss" to check the validity of the JWT; Style: - 2 blank lines between functions; - 1 blank like before "else" and "elseif"; - jwt -> JWT; - Capitalized logs and response messages; - Added description for each schema configuration parameter;
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.
Please remove the style changes and add test cases to support your fix. Thanks.
@shreemaan-abhishek thank you for the feedback. I understand the importance of keeping PRs focused, but I made the style changes to align with the code_style guide. Could you please clarify if:
Anyways, I'll be happy to add the necessary test cases, as soon as possible :-) |
I added a new test case for feature apache#11276 Since the default value of the new config parameter "key_claim_name" is "key", "default behaviour" is already validated by other tests.
+ Removed external httpbin upstream in favor of local endpoint (/hello); + Cleaned code;
@shreemaan-abhishek
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the [email protected] list. Thank you for your contributions. |
Hello, any news on this PR? |
local real_payload = { | ||
key = key, | ||
[key_claim_name] = key, |
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.
although the key_claim_name has changed, the value of key_claim_name
will always be key
. That doesn't fit into the scene. For example, if the key_claim_name
is exp
then the value should be the expiry time, not the key. Right?
@mikyll, please rebase with master there have been some changes in the CI. |
key_claim_name
Description
New feature:
key_claim_name
(default = "key"), so for example one could use "iss" to check the validity of the JWT;(similar behaviour to Kong JWT plugin)
Fixes #11276
Checklist