cancel
Showing results for 
Search instead for 
Did you mean: 

Several authenticationChains, who wins?

OlivierM_
Star Contributor
Star Contributor

Still struggling for redefinition of my authenticationChain, I noticed that it's redefined in several places. Beside my own XML contribs (in /nxserver/config), I can find some :

  • in nuxeo-platform-web-common-5.4.2-HF04.jar/OSGI-INF/authentication-contrib.xml
  • in nuxeo-webengine-core-5.4.2-HF01.jar/OSGI-INF/authentication-contrib.xml

The question is : what happens when such a thing is redefined twice? Or, put simply : who wins? Clearly not mine, but how is it decided?

1 ACCEPTED ANSWER

Thierry_Martins
Star Collaborator
Star Collaborator

hello,

the winner is the last who deploys its authentication chain. To be the winner, you can force the deployment order using the keyword "require"

As you found that almost two contributions defines an authentication chain, your contribution may look like

<component name="ru.blabla.my.auth.component">

  <require>org.nuxeo.ecm.platform.ui.web.auth.defaultConfig</require>
  <require>org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig</require>
  ... <!-- my auth chain here -->
</component>

Thierry

View answer in original post

1 REPLY 1

Thierry_Martins
Star Collaborator
Star Collaborator

hello,

the winner is the last who deploys its authentication chain. To be the winner, you can force the deployment order using the keyword "require"

As you found that almost two contributions defines an authentication chain, your contribution may look like

<component name="ru.blabla.my.auth.component">

  <require>org.nuxeo.ecm.platform.ui.web.auth.defaultConfig</require>
  <require>org.nuxeo.ecm.platform.ui.web.auth.WebEngineConfig</require>
  ... <!-- my auth chain here -->
</component>

Thierry