-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(auth): add optional OIDC-based JWT validation for API routes #30
base: main
Are you sure you want to change the base?
feat(auth): add optional OIDC-based JWT validation for API routes #30
Conversation
f2c5e5e
to
c5b45b2
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
=======================================
Coverage ? 61.03%
=======================================
Files ? 52
Lines ? 1881
Branches ? 0
=======================================
Hits ? 1148
Misses ? 733
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR adds optional JWT validation middleware for
/repo
,/user
, and/push
endpoints.If
jwt
auth method is present and enabled in theproxy.config.json
jwtConfig
inproxy.config.json
.clientID
,authorityURL
(and potentially, theexpectedAudience
) provided in the configIf
jwt
is not enabled, it works as it used to.To activate the JWT check, you must fill in the JWT details (
proxy.config.json
). The following will let you verify against my Google testing app:You can manually generate a sample JWT by accessing the following link in your browser:
Upon successful login, it will redirect to the callback URL containing an auth code (
code
query param). ReplaceAUTHORIZATION_CODE
below with the code, to issue a JWT:Note: Although my Google app secrets are exposed, only registered emails can use it. Let me know if you'd like to test it out, and I can add your email to the app!
Changelog
jwtAuthHandler
middleware for/repo
,/user
, and/push
endpoints