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

How to override the coreAuthenticationProvider in ycommercewebservices?

Former Member
0 Likes
1,832

We are using 6.2 hybris commerce. Currently site is based hybris commerce and cms. We are trying to move to different FE by making use of OCC apis in hybris. In existing application user is authenticated in CRM, for that we have a provider which extends b2baccelerator authentication provider in storefront extension. As we are moving to ycommerece webservices, we are trying to use oauth2 and enabled it for token generation. OOTB authentication is done by core authentication provider. We need to extend the core authentication provider to make authentication initially with custom CRM authentication and then onto core authentication and flow need to go token generation. In this approach we are unable to override or extend the core authentication provider. In some forum questions I see people made a patch on oauth module files. For us it may be not be possible as I need to override or place custom provider in ootb place. Please advise. Appreciate your help

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member842327
Discoverer
0 Likes

You can override the wsAuthenticationProvider. It works in the -spring.xml but not in the web-spring.xml

<alias name="testWsUserDetailsService" alias="wsUserDetailsService"/>
<bean id="testWsUserDetailsService" class="de.hybris.platform.spring.security.CoreUserDetailsService"/>

<alias name="testAuthenticationProvider" alias="wsAuthenticationProvider"/>
<bean id="testAuthenticationProvider" class="xyz.testAuthenticationProvider">
<property name="userDetailsService" ref="wsUserDetailsService"/>
</bean>
raul_b_abatol_jr
Newcomer
0 Likes

hi,

Is this question been answered? ran into the same problem. We want to override the ootb oauth authentication provider, have implemented a customer authentication provider, but somehow we couldnt get it to work.

pgundoju
Explorer
0 Likes

Praveen, please take a look at the following components to see if it helps:

<authentication-provider ref="wsAuthenticationProvider" /> - security-spring.xml from ycommercewebservices 
<alias name="defaultWsAuthenticationProvider" alias="wsAuthenticationProvider" /> - oauth2-spring.xml

To introduce new authentication provider for OCC, you need to generate new extension of type ycommercewebservices

Former Member
0 Likes

Hi Pavan,

We have created Ycommecewebservices extesnion and it is not possible directly to override that bean in this extension. I have seen some one answered in different question to make patch. So I wonder is that only the way