<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{{title}}</title>
  <!-- Bootstrap CSS and Theme for demo purposes -->
  <link rel="stylesheet" href="/common/css/bootstrap.min.css">
  <link rel="stylesheet" href="/common/css/solid.css">
</head>
<body>
<div class="container title">
  <h1>Authorize {{app_origin}} to access your Pod?</h1>
  <div class="panel panel-default">
    <div class="panel-body">
      <div class="page-title">
        <p>Solid allows you to precisely choose what other people and apps can read and write in a Pod. This version of the authorization user interface (node-solid-server V5.1) only supports the toggle of global access permissions to all of the data in your Pod.</p>
        <p><strong>If you don’t want to set these permissions at a global level, uncheck all of the boxes below, then click authorize.</strong> This will add the application origin to your authorization list, without granting it permission to any of your data yet. You will then need to manage those permissions yourself by setting them explicitly in the places you want this application to access.</p>
        <p>By clicking Authorize, any app from {{app_origin}} will be able to:</p>
      </div>
      <form method="post" action="/sharing">

        <input id="read" type="checkbox" name="access_mode" value="Read" checked>
        <label for="read">Read all documents in the Pod</label>
        <br>

        <input id="write" type="checkbox" name="access_mode" value="Write" checked>
        <label for="write">Add data to existing documents, and create new documents</label>
        <br>

        <input id="append" type="checkbox" name="access_mode" value="Append" checked>
        <label for="append">Modify and delete data in existing documents, and delete documents</label>
        <br>

        <input id="control" type="checkbox" name="access_mode" value="Control">
        <label for="control">Give other people and apps access to the Pod, or revoke their (and your) access</label>
        <br>
        <br>

        <button type="submit" class="btn btn-primary" name="consent" value="true">Authorize</button>
        <button type="submit" class="btn btn-default" name="cancel" value="true">Cancel</button>
        {{> auth/auth-hidden-fields}}
      </form>
      <p><i>This server (node-solid-server V5.1) only implements a limited subset of OpenID Connect, and doesn’t yet support token issuance for applications. OIDC Token Issuance and fine-grained management through this authorization user interface is currently in the development backlog for node-solid-server</i></p>
    </div>
  </div>
</div>
</body>
</html>
