You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.7 KiB

  1. <div class="narrow">
  2. <?= partial('partials/header') ?>
  3. <div id="authorization_endpoint">
  4. <h3>Authorization Endpoint</h3>
  5. <p><i>The authorization endpoint tells this app where to direct your browser to sign you in.</i></p>
  6. <?php if($this->authorizationEndpoint): ?>
  7. <div class="bs-callout bs-callout-success">Found your authorization endpoint: <code><?= $this->authorizationEndpoint ?></code></div>
  8. <?php else: ?>
  9. <div class="bs-callout bs-callout-danger">Could not find your authorization endpoint!</div>
  10. <p>You need to set your authorization endpoint in a <code>&lt;link&gt;</code> tag on your home page.</p>
  11. <?= partial('partials/auth-endpoint-help') ?>
  12. <?php endif; ?>
  13. </div>
  14. <div id="token_endpoint">
  15. <h3>Token Endpoint</h3>
  16. <p><i>The token endpoint is where this app will make a request to get an access token after obtaining authorization.</i></p>
  17. <?php if($this->tokenEndpoint): ?>
  18. <div class="bs-callout bs-callout-success">Found your token endpoint: <code><?= $this->tokenEndpoint ?></code></div>
  19. <?php else: ?>
  20. <div class="bs-callout bs-callout-danger">Could not find your token endpoint!</div>
  21. <p>You need to set your token endpoint in a <code>&lt;link&gt;</code> tag on your home page.</p>
  22. <?= partial('partials/token-endpoint-help') ?>
  23. <?php endif; ?>
  24. </div>
  25. <div id="micropub_endpoint">
  26. <h3>Micropub Endpoint</h3>
  27. <p><i>The Micropub endpoint is the URL this app will use to post new photos.</i></p>
  28. <?php if($this->micropubEndpoint): ?>
  29. <div class="bs-callout bs-callout-success">
  30. Found your Micropub endpoint: <code><?= $this->micropubEndpoint ?></code>
  31. </div>
  32. <?php else: ?>
  33. <div class="bs-callout bs-callout-danger">Could not find your Micropub endpoint!</div>
  34. <p>You need to set your Micropub endpoint in a <code>&lt;link&gt;</code> tag on your home page.</p>
  35. <?= partial('partials/micropub-endpoint-help', $this) ?>
  36. <?php endif; ?>
  37. </div>
  38. <?php if($this->authorizationURL): ?>
  39. <h3>Ready!</h3>
  40. <p>Clicking the button below will take you to <strong>your</strong> authorization server which is where you will allow this app to be able to post to your site.</p>
  41. <form action="/auth/redirect" method="get">
  42. <p>Choose the scope to request:</p>
  43. <ul style="list-style-type: none;">
  44. <li><input type="radio" name="scope" value="create update" checked="checked"> create update</li>
  45. <li><input type="radio" name="scope" value="create"> create</li>
  46. <li><input type="radio" name="scope" value="post"> post (legacy)</li>
  47. </ul>
  48. <button class="btn btn-primary" type="submit" id="auth-submit">Authorize</button>
  49. <input type="hidden" name="authorization_url" value="<?= $this->authorizationURL ?>">
  50. </form>
  51. <?php endif; ?>
  52. </div>