code: def requires_auth(self, func):
          '''
          Decorator to prompt for user name and password. Useful for data dumps,
          etc.  That you don't want to be public.
          '''
          @wraps(func)
          def decorated(*args, **kwargs):
              ''' Wrapper '''
              auth = request.authorization
              if not auth or not self.check_auth(auth.username, auth.password):
                  return self.authenticate()
              return func(*args, **kwargs)
          return decoratef requires_auth(self, func):
          '''
          Decorator to prompt for user name and password. Useful for data dumps,
          etc.  That you don't want to be public.
          '''
          @wraps(func)
          def decorated(*args, **kwargs):
              ''' Wrapper '''
              auth = request.authorization
              if not auth or not self.check_auth(auth.username, auth.password):
                  return self.authenticate()
              return func(*args, **kwargs)
          return decorated
docs: Decorator to prompt for user name and password. Useful for data dumps,
          etc.  That you don't want to be public.