Skip to Content
0
Former Member
Jan 09, 2018 at 04:40 AM

Cannot Login in Store front issue spring security

301 Views

I am encountering a login issue in my storefront

Sometimes when i login the login page reloads again .. The required response is either login success or login failure response should have loaded but instead the login page is loading.

my spring-security-config.xml looks like

 <security:intercept-url pattern="/j_spring_security_check" requires-channel="http" />
 
 <security:form-login login-page="/popup/direct?login=true"
  authentication-failure-handler-ref="loginAuthenticationFailureHandler"
  authentication-success-handler-ref="loginGuidAuthenticationSuccessHandler"  
  username-parameter="j_username" 
  password-parameter="j_password"
  login-processing-url="/j_spring_security_check" />
 
 <bean id="loginAuthenticationFailureHandler" class="com.arvto.storefront.security.LoginAuthenticationFailureHandler" >
         <property name="bruteForceAttackCounter" ref="aBruteForceAttackCounter" />
         <property name="defaultFailureUrl" value="/login?error=true"/>
         <property name="userService" ref="userService" />
     </bean>
 <bean id="loginAuthenticationSuccessHandler" class="com.arvto.storefront.security.StorefrontAuthenticationSuccessHandler" >
         <property name="customerFacade" ref="customerFacade" />
         <property name="defaultTargetUrl" value="/"/>
 </bean>

So if login failure "/login?error=true" should be loaded if login success "/" should be loaded

but instead login-page "/popup/direct?login=true" is loading

i have seen a similar issue in ( https://wiki.hybris.com/pages/viewpage.action?spaceKey=forum&title=spring+security+for+login ) but the solution is not clear