Skip to content

feat: implement oauth2 client credentials auth profile#48

Merged
ndr-brt merged 1 commit intomainfrom
42-oauth2-authorization
Mar 18, 2026
Merged

feat: implement oauth2 client credentials auth profile#48
ndr-brt merged 1 commit intomainfrom
42-oauth2-authorization

Conversation

@ndr-brt
Copy link
Copy Markdown
Contributor

@ndr-brt ndr-brt commented Mar 16, 2026

What

Implements oauth2 client credentials auth profile

How

By registering the authorization profile on the Dataplane instance:

Dataplane.newInstance()
    .registerAuthorization(new Oauth2ClientCredentialsAuthorization())
    ...
    .build()

And registering the control-plane with such profile, every call made to that control-plane will be done by requesting a new jwt token to the configured tokenUrl with clientId and clientSecret attributes.

NOTE: this is not much more than an example, a more fine tuned implementation with token caching and refresh would be up to the user.

Additional notest

  • refactored a little to make the AuthorizationProfile usage easier and less convoluted

Closes #42

@ndr-brt ndr-brt requested a review from ronjaquensel March 16, 2026 09:25
@ndr-brt ndr-brt added the enhancement New feature or request label Mar 16, 2026
@ndr-brt ndr-brt force-pushed the 42-oauth2-authorization branch 3 times, most recently from c70620e to 5b6d5ed Compare March 16, 2026 10:52
Copy link
Copy Markdown
Contributor

@ronjaquensel ronjaquensel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ndr-brt ndr-brt force-pushed the 42-oauth2-authorization branch from 5b6d5ed to 48ed415 Compare March 18, 2026 13:56
@ndr-brt ndr-brt merged commit a813b71 into main Mar 18, 2026
3 checks passed
@ndr-brt ndr-brt deleted the 42-oauth2-authorization branch March 18, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement OAuth 2 Client Credentials Grant authorization profile

2 participants