I'm building a rough JSON API using normal Craft templates (i.e. rendering the JSON with Twig) but would like to be able to return HTTP 403 to unauthenticated requests.
For example:
{% if not user %}
{% respond 403 %}
{% endif %}
Is something like this built in?