OpenID Connect: Respect the configured flow types if the server sends none#730
OpenID Connect: Respect the configured flow types if the server sends none#730Traderjoe95 wants to merge 4 commits intoeclipse-vertx:masterfrom
Conversation
|
@Traderjoe95 can you add a test for this? |
|
@vietj sure, I'm working on it. It's been a bit of a hassle, but I'm getting to it. There's one thing that just came to my mind, and I would like to get your opinion on this: When the user configures a set of supported flow types, and the server also sends a set, wouldn't it be better to use the intersection of both instead of overriding the previous configuration? In this scenario, setting the If the user or server doesn't set any supported grant types, that means "I support all grant types", if both don't set anything, we fall back to the default. What do you think? In my opinion that would allow more flexibility than just having the server override everything |
|
I will first push my tests for the original implementation, then in a second commit, I will update to my suggestion so it can be easily reverted if you don't like it |
|
I updated the code to the alternative solution I proposed earlier. Let me know what you think! |
Motivation:
The
OpenIDConnectAuthunconditionally resets thesupportedGrantTypesofOAuth2Optionstonull. Therefore, the previously configured grant types are ignored and replaced by the default (implicit, auth_code). This triggers a configuration validation exception if noclientIdis configured. In use cases that only need OAuth token validation functionality, this behavior is undesired, as they might never need a client ID.This is fixed by only resetting
supportedGrantTypeswhen the authentication server sendsgrant_types_supportedon its own.Fixes #729
Conformance:
You should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines