Skip to content

feat(jwt): support more algorithms#12944

Merged
nic-6443 merged 12 commits into
apache:masterfrom
shreemaan-abhishek:feat/support-more-algo
Feb 6, 2026
Merged

feat(jwt): support more algorithms#12944
nic-6443 merged 12 commits into
apache:masterfrom
shreemaan-abhishek:feat/support-more-algo

Conversation

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

Description

Support more algorithms used to generate jwt tokens.

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)

Signed-off-by: Abhishek Choudhary <[email protected]>
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Jan 27, 2026
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
nic-6443
nic-6443 previously approved these changes Jan 29, 2026
Comment thread apisix/plugins/jwt-auth.lua Outdated
Signed-off-by: Abhishek Choudhary <[email protected]>
f
Signed-off-by: Abhishek Choudhary <[email protected]>
membphis
membphis previously approved these changes Feb 3, 2026

@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.

nice PR, minor issues

Comment thread apisix/plugins/jwt-auth/parser.lua Outdated

function _M.new(token)
local jwt_obj = jwt:load_jwt(token)
if not jwt_obj.valid then

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.

pls confirm the jwt_obj is a table always

Comment thread apisix/plugins/jwt-auth/parser.lua Outdated

function _M.verify_signature(self, key)
return alg_verify[self.header.alg](self.raw_header .. "." ..
self.raw_payload, base64_decode(self.signature), key)

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.

pls add 4 spaces

Comment thread apisix/plugins/jwt-auth/parser.lua Outdated


function _M.get_default_claims(self)
return {

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.

use a global lua variable, then we can reuse this table

Signed-off-by: Abhishek Choudhary <[email protected]>
f
Signed-off-by: Abhishek Choudhary <[email protected]>
nic-6443
nic-6443 previously approved these changes Feb 4, 2026
Signed-off-by: Abhishek Choudhary <[email protected]>
@nic-6443
nic-6443 requested a review from membphis February 6, 2026 01:13
@nic-6443
nic-6443 merged commit 282995f into apache:master Feb 6, 2026
23 checks passed
wistefan pushed a commit to wistefan/apisix that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants