i want to expire a users first session if loginde for second time.
note that i write custom filter for my login page like as below and every things work truly.
its related part of my definition in my security.xml file.
my problem is when i login with user1 and pass 123456 for second time,Code:<beans:bean id="myLoginFilter" class="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter"> <beans:property name="sessionAuthenticationStrategy" ref="sas"/> <beans:property name="usernameParameter" value="username"/> <beans:property name="passwordParameter" value="password"/> <beans:property name="filterProcessesUrl" value="/test"/> <beans:property name="authenticationManager" ref="mySimpleAuthenticationManager"/> <beans:property name="authenticationSuccessHandler" ref="successHandlerBean"/> <beans:property name="authenticationFailureHandler" ref="failureHandlerBean"/> </beans:bean> <beans:bean id="sas" class="org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy"> <beans:constructor-arg name="sessionRegistry" ref="sessionRegistry"/> <beans:property name="maximumSessions" value="1"/> </beans:bean> <beans:bean id="sessionRegistry" class="org.springframework.security.core.session.SessionRegistryImpl"/>
first session of this user be expired and expired field of SessionInformation is true
but still can do work in homepage and refresh or do any thing.
is there any way to when expiring users first session, at first request to server redirecting to loginpage?


Reply With Quote