6 Replies Latest reply on Aug 12, 2015 5:24 AM by jacobilsoe

    Problem using a custom authentication provider

    jacobilsoe

      Hi.

       

      I am trying to use a custom authentication provider as described here: https://docs.jboss.org/author/display/MODE/Custom+authentication+providers

       

      I am using ModeShape 4.2.0.Final and WildFly 8.2.0.Final and my repository section in standalone.xml looks like this:

       

      <repository name="repo" anonymous-roles="" >

                      <node-types>

                          <node-type>

                              nt.cnd

                          </node-type>

                      </node-types>

        <file-binary-storage />

        <authenticators>

        <authenticator classname="MyAuthenticationProvider" module="MyModule"/>

        </authenticators>

      </repository>

       

      The problem is that my authentication provider is never used. I have debugged it and found that there are three entries in the providers list in org.modeshape.jcr.security.AuthenticationProviders:

       

      JBossDomainAuthenticationProvider

      ServletProvider

      MyAuthenticationProvider

       

      It looks like the first two are added in org.modeshape.jboss.subsystem.AddRepository.parseSecurity while MyAuthenticationProvider is added later.

       

      Do I need to configure things in a different manner to ensure my provider gets added first in the providers list?

       

      Thanks,

      Jacob