code: def _init_auth(self, config):
          
          self.auth_mode = self._get_param('auth', 'auth.mode', config)
          if self.auth_mode in ['and', 'or', 'none']:
              pass
          elif self.auth_mode == 'custom':
              # load custom auth module
              auth_module = self._get_param('auth', 'auth.module', config)
              auth = __import__(auth_module, globals(), locals(), ['Auth'], 0)
              self.auth = auth.Auth(config['auth'], cherrypy.log)
          else:
              raise WrongParamValue(
                  'auth.mode',
                  'auth',
                  ['and', 'or', 'none', 'custom'],
                  )
  
          self.roles_file = self._get_param('roles', 'roles.file', config)
          cherrypy.log.error(
              msg="loading roles file '%(file)s'" % {'file': self.roles_file},
              severity=logging.DEBUG
          )
          self.roles = Roles(self.roles_file)
docs: Init authentication
          @dict: configuration of ldapcherry