-
Notifications
You must be signed in to change notification settings - Fork 215
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(Authentication): Add support for Client Assertion #699
Conversation
👋 Thanks for contributing! Please be patient while a maintainer reviews your PR. In the meantime, please make sure you've read our contributing guide. |
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #699 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 1282 1282
===========================================
Files 66 66
Lines 4498 4498
===========================================
Hits 4498 4498
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Description
This PR adds support for Client Assertion, as an alternative to using Client Secrets, when making requests against the Authentication API.
Changes include the introduction of two new SDK configuration properties:
clientAssertionSigningKey
, which accepts anOpenSSLAsymmetricKey
object, a PEM formatted private key as astring
, a file path to a PEM certificate (e.g.file://path/to/file.pem
), ornull
to disable the feature. Defaults tonull
.clientAssertionSigningAlgorithm
, which accepts a string. Defaults toRS256
.When configured, the
clientAssertionSigningKey
will take precedence over any configuredclientSecret
, where appropriate.When passing a string as the value to
clientAssertionSigningKey
, the format can be anything the OpenSSLopenssl_pkey_get_private()
Changes also include a new class,
Auth0\SDK\Token\ClientAssertionGenerator
. This is a template interstitial forAuth0\SDK\Token\Generator
that will apply the necessary configuration to create a JSON Web Token appropriate for use with the Client Assertion feature.Type of change
Checklist