ggicci / caddy-jwt

🆔 Caddy Module JWT Authentication
MIT License
71 stars 20 forks source link

Added the skip_verification option. #85

Closed svetlyi closed 1 month ago

svetlyi commented 1 month ago

This option is intended for users who prefer to verify the JWT token elsewhere while still leveraging other features provided by the module.

All the details are provided in the comment for SkipVerification in jwt.go. In short, we verify the token after the Caddy proxy in the upstreams, but we still need the other features offered by the plugin, especially parsing and populating user metadata.

Hopefully it would be useful for other people as well.

Thanks.

codecov-commenter commented 1 month ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.05%. Comparing base (5f1c2a8) to head (1f4273d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #85 +/- ## ========================================== + Coverage 94.83% 95.05% +0.22% ========================================== Files 2 2 Lines 329 344 +15 ========================================== + Hits 312 327 +15 Misses 12 12 Partials 5 5 ``` | [Flag](https://app.codecov.io/gh/ggicci/caddy-jwt/pull/85/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ggicci/caddy-jwt/pull/85/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci) | `95.05% <100.00%> (+0.22%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ggicci#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ggicci commented 1 month ago

LGTM, thanks for the contribution :)