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
which cause the setSecurityContextRepository(...) defined in parent class AbstractAuthenticationProcessingFilter not configurable anymore.
The securityContextRepository reference is just for the call of successfulAuthentication(...) (
If we apply the changes as you suggested, there is a test that stops passing where it expects the AuthenticationSuccessHandler to not be called. I don't think that we should apply a change that might break things for others.
The code duplication is not a problem here, we should probably override setSecurityContextRepository to call super and also set it into the CasAuthenticationFilter#securityContextRepository. The same goes for SecurityContextHolderStrategy.
marcusdacoregio
changed the title
CasAuthenticationFilter cannot configured SecurityContextRepository
Cannot configure SecurityContextRepository in CasAuthenticationFilterFeb 2, 2024
kse-music
added a commit
to kse-music/spring-security
that referenced
this issue
Feb 3, 2024
Describe the bug
CasAuthenticationFilter
set a reference ofSecurityContextRepository
(spring-security/cas/src/main/java/org/springframework/security/cas/web/CasAuthenticationFilter.java
Line 216 in e771267
spring-security/cas/src/main/java/org/springframework/security/cas/web/CasAuthenticationFilter.java
Line 233 in e771267
setSecurityContextRepository(...)
defined in parent classAbstractAuthenticationProcessingFilter
not configurable anymore.The
securityContextRepository
reference is just for the call ofsuccessfulAuthentication(...)
(spring-security/cas/src/main/java/org/springframework/security/cas/web/CasAuthenticationFilter.java
Lines 227 to 236 in e771267
For me, seems like it is just duplicating the code defined in parent class
AbstractAuthenticationProcessingFilter
(spring-security/web/src/main/java/org/springframework/security/web/authentication/AbstractAuthenticationProcessingFilter.java
Lines 322 to 333 in e771267
securityContextRepository
reference defined inCasAuthenticationFilter
.Example:
Expected behavior
CasAuthenticationFilter
should be able to configure differentSecurityContextRepository
by callingsetSecurityContextRepository(...)
The text was updated successfully, but these errors were encountered: