Skip to content

Allow clientId together with clientAssertion/clientAssertionType - #753

Open
jnbdz wants to merge 1 commit into
eclipse-vertx:masterfrom
SiteNetSoft:issue-713-client-assertion-with-client-id
Open

Allow clientId together with clientAssertion/clientAssertionType#753
jnbdz wants to merge 1 commit into
eclipse-vertx:masterfrom
SiteNetSoft:issue-713-client-assertion-with-client-id

Conversation

@jnbdz

@jnbdz jnbdz commented Aug 7, 2026

Copy link
Copy Markdown

Some providers (e.g. Microsoft Entra, Keycloak) require the client_id to be present in the token request even when the client authenticates with an assertion, and the OIDC core spec includes client_id in its private_key_jwt example as well.

Previously OAuth2API.token() only sent client_assertion/client_assertion_type when no clientId was configured. This change sends the assertion parameters whenever the client does not authenticate with a client secret, so client_id and the assertion can be used together. Client secret authentication still takes precedence and does not send the assertion.

Added OAuth2ClientAssertionTest covering:

  • client_id + assertion sent together
  • assertion-only clients (unchanged behavior)
  • client secret clients ignore the assertion (unchanged behavior)

Fixes #713

Some providers (e.g. Microsoft Entra, Keycloak) require the client_id to
be present in the token request even when the client authenticates with
an assertion. Send the assertion parameters whenever the client does not
authenticate with a client secret, instead of only when no client_id is
configured.

Fixes eclipse-vertx#713
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying clientId together with clientAssertion/clientAssertionType

1 participant