Only reset supported grant types when the discovery document sends them - #754
Open
jnbdz wants to merge 2 commits into
Open
Only reset supported grant types when the discovery document sends them#754jnbdz wants to merge 2 commits into
jnbdz wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenIDConnectAuth.discoverunconditionally cleared the configuredsupportedGrantTypesbefore checking whether the discovery document contains the optionalgrant_types_supportedfield. When the server omits it, the user configuration was lost, validation fell back to the defaults (auth_code,implicit), and discovery failed withConfiguration 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:grant_types_supportedFixes #729