parameters: (func)
return_statement: return decorated
docstring: requires_auth annotation
docstring_summary: requires_auth annotation
docstring_tokens: requires_auth annotation
function: def requires_auth(func):
      """
      requires_auth annotation
      """
      @wraps(func)
      def decorated(*args, **kwargs):
          """
          decorator
          """
          auth = request.authorization
          if not authentication_enabled() or (auth and check_auth(auth.username, auth.password)):
              return func(*args, **kwargs)
          return authenticate()
      return decorated
function_tokens: def requires_auth ( func ) : @ wraps ( func ) def decorated ( * args , * * kwargs ) : """
          decorator
          """ auth = request . authorization if not authentication_enabled ( ) or ( auth and check_auth ( auth . username , auth . password ) ) : return func ( * args , * * kwargs ) return authenticate ( ) return decorated