Skip to content

fix: save token in context with KeyFunc#369

Open
vflaux wants to merge 1 commit intoappleboy:masterfrom
vflaux:fix_token_in_ctx_with_keyfunc
Open

fix: save token in context with KeyFunc#369
vflaux wants to merge 1 commit intoappleboy:masterfrom
vflaux:fix_token_in_ctx_with_keyfunc

Conversation

@vflaux
Copy link

@vflaux vflaux commented Mar 11, 2026

When you define a GinJWTMiddleware.KeyFunc, the token is not saved in the gin context.

This PR:

  • save the jwt token in gin context when KeyFunc is defined
  • define jwt token context key as a const

@vflaux vflaux changed the title fix: save token in context with keyFunc fix: save token in context with KeyFunc Mar 11, 2026
- define jwt token context key as const
- save the jwt token in gin context when keyfunc is defined
@vflaux vflaux force-pushed the fix_token_in_ctx_with_keyfunc branch from 3f633c5 to a01b9bf Compare March 11, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant