Closed ch4mpy closed 7 months ago
Released with 7.3.0
. The headers, request params and session attributes used by the default (Server)OAuth2AuthorizationRequestResolver
, authentication success & failure handlers, and logout success handler are exposed by SpringAddonsOidcClientProperties
Is your feature request related to a problem? Please describe. Currently, default success and failure handlers support only one post-login and one post-logout URI defined in application properties.
It would be quite convenient that the frontend can provide with a header or query param the URI to which the user should be redirected after login / logout.
Describe the solution you'd like When the frontend provides with a post-login URI when initiating an authorization-code flow, this URI could be saved in session and later used in authentication success / failure handlers (after the client exchanged the authorization-code for tokens or the authentication process failed for whatever reason).
Same for RP-Initiated Logout: if the frontend provides with a post logout URI when initiating logout, then it would be nice that this URI is used instead of the one in application properties.
Describe alternatives you've considered Define
(Server)OAuth2AuthorizationRequestResolver
of my own, but this feature is rather recurrent and this leads to quite some duplicated code.Additional context This feature enables to keep the current route in the frontend when login can be initiated from several places. It also enables to serve several frontends with a single BFF.