grant.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. script('core', 'login/grant');
  7. style('core', 'login/authpicker');
  8. /** @var array $_ */
  9. /** @var \OCP\IURLGenerator $urlGenerator */
  10. $urlGenerator = $_['urlGenerator'];
  11. ?>
  12. <div class="picker-window small">
  13. <h2><?php p($l->t('Account access')) ?></h2>
  14. <p class="info">
  15. <?php p($l->t('Currently logged in as %1$s (%2$s).', [
  16. $_['userDisplayName'],
  17. $_['userId'],
  18. ])) ?>
  19. </p>
  20. <p class="info">
  21. <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [
  22. '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>',
  23. \OCP\Util::sanitizeHTML($_['instanceName'])
  24. ])) ?>
  25. </p>
  26. <br/>
  27. <p id="redirect-link">
  28. <form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.generateAppPassword')) ?>">
  29. <input type="hidden" name="clientIdentifier" value="<?php p($_['clientIdentifier']) ?>" />
  30. <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
  31. <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
  32. <input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" />
  33. <?php if ($_['direct']) { ?>
  34. <input type="hidden" name="direct" value="1" />
  35. <?php } ?>
  36. <div id="submit-wrapper">
  37. <input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" />
  38. </div>
  39. </form>
  40. </p>
  41. </div>