cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

backoffice authentification

Former Member
0 Kudos
436

Is there a way to run custom code after a successful backoffice authentification ?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes, you can.

In the backoffice core jar there is a definition of spring bean:

     <beans:alias alias="backofficeAuthenticationSuccessHandler" name="defaultBackofficeAuthenticationSuccessHandler"/>
     <beans:bean id="defaultBackofficeAuthenticationSuccessHandler"
         class="com.hybris.cockpitng.util.web.authorization.BackofficeAuthenticationSuccessHandler">
         <beans:property name="cockpitUserService" ref="cockpitUserService" />
         <beans:property name="cockpitLocaleService" ref="cockpitLocaleService" />
     </beans:bean>
 
  • Write your own AuthenticationSuccess bean, inheriting from BackOfficeAuthenticationSuccessHandler

  • register it in backoffice-spring-security.xml

  • call "super.onAuthenticationSuccess" as the first thing in the method "onAuthenticationSuccess"

  • and then do your things