You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During HttpSecurity build process, a custom configurer might need to know if a custom logout success handler has been set for the LogoutConfigurer, for example:
classMyCustomDslextendsAbstractHttpConfigurer<MyCustomDsl, HttpSecurity> {
@Overridepublicvoidinit(HttpSecurityhttp) throwsException {
varlogout = http.getConfigurer(LogoutConfigurer.class);
if (logout.isCustomLogoutSuccess()) { // <-- can't do this now// custom logout, preserve it
} else {
// no custom logout, customize it
}
}
}
would allow to preserve a custom handler set like this:
During the init phase of customDsl, it's not possible to know if logout.logoutSuccessHandler has ever been set, since:
LogoutConfigurer does not set the custom handler as a shared object
LogoutConfigurer#getLogoutSuccessHandler returns a new handler if not already set
LogoutConfigurer#isCustomLogoutSuccess is not public
Context
This is affecting my custom handler's ability to set a logout success handler only if the user hasn't already set one. I couldn't find any alternative other than reflection, but I can't use reflection.
The text was updated successfully, but these errors were encountered:
Expected Behavior
During
HttpSecurity
build process, a custom configurer might need to know if a custom logout success handler has been set for theLogoutConfigurer
, for example:would allow to preserve a custom handler set like this:
Current Behavior
During the
init
phase ofcustomDsl
, it's not possible to know iflogout.logoutSuccessHandler
has ever been set, since:LogoutConfigurer
does not set the custom handler as a shared objectLogoutConfigurer#getLogoutSuccessHandler
returns a new handler if not already setLogoutConfigurer#isCustomLogoutSuccess
is not publicContext
This is affecting my custom handler's ability to set a logout success handler only if the user hasn't already set one. I couldn't find any alternative other than reflection, but I can't use reflection.
The text was updated successfully, but these errors were encountered: