-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Expected Behavior
When switching between MVC and Reactive variants, the behavior of the oauth2login should likely be the same, when using token relay with Spring Cloud Gateway.
Current Behavior
the DefaultOAuth2AuthorizationRequestResolver doesn't alter the defaultAction when the client grant is authorization code, the reactive stack changes the action urimap variable.
Context
Lines 253 to 255 in 62c5a25
if (AuthorizationGrantType.AUTHORIZATION_CODE.equals(clientRegistration.getAuthorizationGrantType())) { | |
action = "login"; | |
} |
so when I'm using my tokenRelay in reactive spring cloud gateway, everything works as expected, but when working with MVC, the generated url, which starts here
Line 120 in 62c5a25
String redirectUriAction = getAction(request, "authorize"); |
generates an "invalid" URL, because the code doesn't interfere:
Line 250 in 62c5a25
uriVariables.put("action", (action != null) ? action : ""); |
when calling "authorize" signature generates this url:
/authorize/oauth2/code/{registrationId}......
while calling "login" generates a "valid" one:
/login/oauth2/code/{registrationId}....
*of course modifying manually the redirect-uri of the client solves the issue, but would be nice if the behavior is coherent in both technologies