wiki-grav/plugins/login/templates/login.json.twig
2022-04-24 14:32:58 +02:00

5 lines
301 B
Twig

{%- if not grav.user.authenticated -%}
{"code":401,"status":"unauthenticated","error":{"message":"Authentication required","login":{{ include('partials/login-form.html.twig')|trim|json_encode }}}}
{%- else -%}
{"code":200,"status":"authenticated","message":"You have been authenticated"}
{%- endif -%}