login.json.twig 301 B

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