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 afa520d commit f43cb11
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 @@ -432,6 +432,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 the 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 f43cb11

Please sign in to comment.