Files
hehe/user/plugins/login/templates/login.json.twig
T
2018-08-01 16:00:05 +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 -%}