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.

63 lines
2.3 KiB

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