code: def authDomainUser(self, realmname, username, password, environ):
          
          try:
              apikey = self.user_manager.get_user_api_key(username, create=None)
              return apikey is not None and password == apikey
          except:
              return False
docs: Returns True if this username/password pair is valid for the realm,
          False otherwise. Used for basic authentication.