Several authenticationChains, who wins?

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 votes

1 answers

715 views

ANSWER



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

2 votes