code: def basic_auth(self, response=None):
          
          auth = request.authorization
          if auth and self._login_checker({'username': auth.username,
                                           'password': auth.password}):
              session['simple_logged_in'] = True
              session['simple_basic_auth'] = True
              session['simple_username'] = auth.username
              return response or True
          else:
              headers = {'WWW-Authenticate': 'Basic realm="Login Required"'}
              return 'Invalid credentials', 401, headers
docs: Support basic_auth via /login or login_required(basic=True)