-
Couldn't load subscription status.
- Fork 22
feat: support client assertion for client credentials authentication #228
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
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #228 +/- ##
==========================================
- Coverage 88.18% 88.16% -0.02%
==========================================
Files 23 23
Lines 1202 1217 +15
Branches 211 197 -14
==========================================
+ Hits 1060 1073 +13
- Misses 84 86 +2
Partials 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
48b0e9f to
1cf2503
Compare
Description
This PR introduces support for performing a client credentials authentication flow using client assertion (aka private key jwt, jwt ca) as an alternative to the existing client secret authentication method.
As this is an alternative
ClientCredentialsmethod I have split the existing configuration out intoClientSecretConfigand introduced aPrivateKeyJWTto go along side this and changed theClientCredentialsConfigto be union of the two to allow type checking to work correctly.The client assertion signing is performed using jose and I am using v5 of this library over v6 as the latter is an ESM only package which would have implications for our supported Node.js versions.
An extra, not insignificant change to this is the addition of a
customClaimsproperty on the client credentials configuration, this is to allow extra data to be passed to the token exchange for clients that need this.References
Review Checklist
main