Skip to content

Only reset supported grant types when the discovery document sends them - #754

Open
jnbdz wants to merge 2 commits into
eclipse-vertx:masterfrom
SiteNetSoft:issue-729-discovery-grant-types
Open

Only reset supported grant types when the discovery document sends them#754
jnbdz wants to merge 2 commits into
eclipse-vertx:masterfrom
SiteNetSoft:issue-729-discovery-grant-types

Conversation

@jnbdz

@jnbdz jnbdz commented Aug 8, 2026

Copy link
Copy Markdown

OpenIDConnectAuth.discover unconditionally cleared the configured supportedGrantTypes before checking whether the discovery document contains the optional grant_types_supported field. When the server omits it, the user configuration was lost, validation fell back to the defaults (auth_code, implicit), and discovery failed with Configuration missing. You need to specify [clientId] — even for setups that never needed a clientId, such as implicit-only clients used purely to validate JWT access tokens.

This change keeps the configured grant types unless the server actually announces its own, in which case they still replace the configuration as before.

Added OpenIDCDiscoveryGrantTypesTest (local mock discovery server) covering:

  • configured grant types survive when the server omits grant_types_supported
  • server-announced grant types still replace configured ones
  • no configured and no discovered grant types still falls back to the defaults and requires a clientId

Fixes #729

jnbdz and others added 2 commits August 8, 2026 18:04
OpenIDConnectAuth.discover unconditionally cleared the configured
supportedGrantTypes before checking whether the discovery document
contains the optional grant_types_supported field. When the server omits
it, the user configuration was lost and validation fell back to the
defaults, failing with a spurious clientId error for setups that do not
need one (e.g. implicit-only clients used to validate tokens).

Keep the configured grant types unless the server announces its own.

Fixes eclipse-vertx#729
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.

OpenIDConnectAuth.discover: Only reset supported grant types when the server sends it

1 participant