code: def init_app(self, app):
          '''
          Configures an application. This registers an `after_request` call, and
          attaches this `LoginManager` to it as `app.login_manager`.
          '''
  
          self._config = app.config.get('LDAP', {})
          app.ldap_login_manager = self
  
          self.config.setdefault('BIND_DN', '')
          self.config.setdefault('BIND_AUTH', '')
          self.config.setdefault('URI', 'ldap://127.0.0.1')
          self.config.setdefault('OPTIONS', {})
          # Referrals are disabled by default
          self.config['OPTIONS'].setdefault(ldap.OPT_REFERRALS, ldap.OPT_OFF)
  
          if self.config.get('USER_SEARCH') and not isinstance(self.config['USER_SEARCH'], list):
              self.config['USER_SEARCH'] = [self.config['USER_SEARCH']f init_app(self, app):
          '''
          Configures an application. This registers an `after_request` call, and
          attaches this `LoginManager` to it as `app.login_manager`.
          '''
  
          self._config = app.config.get('LDAP', {})
          app.ldap_login_manager = self
  
          self.config.setdefault('BIND_DN', '')
          self.config.setdefault('BIND_AUTH', '')
          self.config.setdefault('URI', 'ldap://127.0.0.1')
          self.config.setdefault('OPTIONS', {})
          # Referrals are disabled by default
          self.config['OPTIONS'].setdefault(ldap.OPT_REFERRALS, ldap.OPT_OFF)
  
          if self.config.get('USER_SEARCH') and not isinstance(self.config['USER_SEARCH'], list):
              self.config['USER_SEARCH'] = [self.config['USER_SEARCH']]
docs: Configures an application. This registers an `after_request` call, and
          attaches this `LoginManager` to it as `app.login_manager`.