title: Add parameter to Flask decorator
body: <p>I use a snippet for Flask that creates a decorator for handling HTTP Basic Auth:</p>
  
  <pre><code>def requires_auth(f):
      @wraps(f)
      def decorated(*args, **kwargs):
          auth = request.authorization
          if not auth or not check_auth(auth.username, auth.password):
              return authenticate()
          return f(*args, **kwargs)
      return decorated
  </code></pre>
  
  <p>This decorator does not allow a parameter to be passed. I would like to change that, how can I do it?
  I have been checking other SO questions about decorators, but still I cannot get this working.</p>