In a Spring Security 3.2 based application I have a explicit configured UsernamePasswordAuthenticationFilter
, that need an reference to the sessionAuthenticationStrategy
(in order to invoke .onAuthentication
).*
The sessionAuthenticationStrategy
is the default one created by <security:http>
(HttpSecurityBeanDefinitionParser
).
My question: Is how can I get an reference to the SessionAuthenticationStrategy
without configuring the complete SessionAuthenticationStrategy
explicite, so that I can inject this reference in XML configuration?
<security:http auto-config="false" use-expressions="true"
entry-point-ref="loginUrlAuthenticationEntryPoint"
access-decision-manager-ref="httpAccessDecisionManager">
...
<security:custom-filter
ref="usernamePasswordAuthenticationFilter"
position="FORM_LOGIN_FILTER"/>
...
</security:http>
...
<bean id="usernamePasswordAuthenticationFilter"
class=" o.s.scurity.web.authentication.UsernamePasswordAuthenticationFilter">
<property name="sessionAuthenticationStrategy" ref="????"> <!-- ?? ->
...
</bean>
*my real UsernamePasswordAuthenticationFilter
is a customized subclass, but that should not matter for this question