Skip to content

feat(jwt-auth): support configuring key_claim_name#11772

Merged
shreemaan-abhishek merged 7 commits into
apache:masterfrom
shreemaan-abhishek:make-key-claim-name-configurable
Nov 27, 2024
Merged

feat(jwt-auth): support configuring key_claim_name#11772
shreemaan-abhishek merged 7 commits into
apache:masterfrom
shreemaan-abhishek:make-key-claim-name-configurable

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Description

Support configuring key_claim_name like kong: https://docs.konghq.com/hub/kong-inc/jwt/configuration/#config-key_claim_name

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request plugin labels Nov 21, 2024
@Revolyssup
Revolyssup self-requested a review November 22, 2024 07:38
Revolyssup
Revolyssup previously approved these changes Nov 22, 2024

@membphis membphis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

need to update the doc at same time

Revolyssup
Revolyssup previously approved these changes Nov 25, 2024
nic-6443
nic-6443 previously approved these changes Nov 25, 2024
}
},
key_claim_name = {
type = "string",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add a limitation about the length, the minimum length should be 1

empty string isn’t acceptable

Comment thread apisix/plugins/jwt-auth.lua Outdated
key_claim_name = {
type = "string",
default = "key",
minLength = "1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@Revolyssup
Revolyssup self-requested a review November 27, 2024 06:48
@shreemaan-abhishek
shreemaan-abhishek merged commit 528ec89 into apache:master Nov 27, 2024
@shreemaan-abhishek
shreemaan-abhishek deleted the make-key-claim-name-configurable branch November 27, 2024 07:25
@mikyll mikyll mentioned this pull request Nov 27, 2024
5 tasks
@mikyll

mikyll commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

This PR fixed #11276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants