def attributes(accept, **kwargs):
    """Specifies the following attributes for the restful endpoint:
        accept: the value of the Accept version header that this method takes
        auth_required: if true this method requires auth
    Example:
    .. code-block:: python

        import restful
        class SomeController(ServiceParent):

            @restful.attributes("application/vnd.com.company.service.auth.v1+json",
                                auth_required=True)
            def comment(self, id):

    """
    def register_decorator(method):
        """Register the decorator as a private attribute of the method"""
        method._accept_decorator = accept
        method._auth_required = kwargs.get('auth_required', True)
        return method
    return register_decorator