Server

Anonymous Authentication

Updated: March 18, 2024

This plugin provides anonymous authentication. Users are automatically logged as a configurable Anonymous user. This module also includes additional actions (to be able to login when already logged as Anonymous) and a dedicated Exception handling (to automatically redirect Anonymous users to login screen after a security error).

To activate anonymous authentication:

  1. Add the plugin to the authentication chain. Contribute an XML extension from the following content. Adapt the authenticationChain element content with the list of plugins you want to use.

    <extension
     target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService"
     point="chain">
     <authenticationChain>
       <plugins>
         <plugin>BASIC_AUTH</plugin>
         <plugin>ANONYMOUS_AUTH</plugin>
         <plugin>THE_PLUGIN_I_WANT_TO_USE</plugin>
       </plugins>
     </authenticationChain>
    </extension>
    

    Use ANONYMOUS_AUTH.

  2. Create an XML extension called anonymous-auth-config.xml with the following content:

     <?xml version="1.0"?>
     <component name="org.nuxeo.ecm.platform.login.anonymous.config">
    
       <!-- Add an Anonymous user -->
       <extension target="org.nuxeo.ecm.platform.usermanager.UserService" point="userManager">
         <userManager>
           <users>
             <anonymousUser id="Guest">
               <property name="firstName">Guest</property>
               <property name="lastName">User</property>
             </anonymousUser>
           </users>
         </userManager>
       </extension>
    
     </component>
    
    
  3. Adapt the anonymousUser id and properties.

  4. Save.