cancel
Showing results for 
Search instead for 
Did you mean: 

Custom B2BAcceleratorAuthenticationProvider is not getting invoked from my custom addon

Former Member
0 Kudos

Hello Experts, I have created my custom addon to override functionality of B2BAcceleratorAuthenticationProvider. But its not getting called , could you please help me to resolve this.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi, Please make sure you have the following file in your custom addon: /myStoreb2bacceleratoraddon/resources/myStoreb2bacceleratoraddon/web/spring/myStoreb2bacceleratoraddon-spring-security-config.xml

and in that make sure you have the following configuration like:

     <security:authentication-provider
         ref="myCustomb2bAcceleratorAuthenticationProvider" />
 </security:authentication-manager>

And make sure you are loading this spring configuration file from your custom addon project.properties file (/myStoreb2bacceleratoraddon/project.properties)

myStoreb2bstorefront.additionalWebSpringConfigs.myStoreb2bacceleratoraddon=classpath\:/myStoreb2bacceleratoraddon/web/spring/myStoreb2bacceleratoraddon-web-spring.xml,classpath\:/myStoreb2bacceleratoraddon/web/spring/multi-step-checkout-config.xml,classpath\:/myStoreb2bacceleratoraddon/web/spring/myStoreb2bacceleratoraddon-spring-security-config.xml

And more important thing is if you have custom token then make sure in your custom authentication provider u have following method like:

 @Override
     public boolean supports(final Class<?> authentication) {
         return MyCustomerAuthenticationToken.class.isAssignableFrom(authentication);
     }