Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Features:
- Store the JWT object in request context;
  • Loading branch information
mikyll committed May 23, 2024
1 parent e393d0c commit 9c3f3a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apisix/plugins/jwt-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ function _M.rewrite(conf, ctx)
core.log.warn("Failed to verify JWT: ", jwt_obj.reason)
return 401, {message = "Failed to verify JWT"}
end

-- Store the JWT object in request context
ctx.jwt_obj = jwt_obj

consumer_mod.attach_consumer(ctx, consumer, consumer_conf)
core.log.info("Hit jwt-auth rewrite")
Expand Down

0 comments on commit 9c3f3a0

Please sign in to comment.