Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

icertificatemanager.php 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * @author Lukas Reschke <lukas@owncloud.com>
  4. * @author Morris Jobke <hey@morrisjobke.de>
  5. * @author Robin Appelman <icewind@owncloud.com>
  6. *
  7. * @copyright Copyright (c) 2016, ownCloud, Inc.
  8. * @license AGPL-3.0
  9. *
  10. * This code is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License, version 3,
  12. * as published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU Affero General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License, version 3,
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>
  21. *
  22. */
  23. namespace OCP;
  24. /**
  25. * Manage trusted certificates for users
  26. * @since 8.0.0
  27. */
  28. interface ICertificateManager {
  29. /**
  30. * Returns all certificates trusted by the user
  31. *
  32. * @return \OCP\ICertificate[]
  33. * @since 8.0.0
  34. */
  35. public function listCertificates();
  36. /**
  37. * @param string $certificate the certificate data
  38. * @param string $name the filename for the certificate
  39. * @return \OCP\ICertificate
  40. * @throws \Exception If the certificate could not get added
  41. * @since 8.0.0 - since 8.1.0 throws exception instead of returning false
  42. */
  43. public function addCertificate($certificate, $name);
  44. /**
  45. * @param string $name
  46. * @since 8.0.0
  47. */
  48. public function removeCertificate($name);
  49. /**
  50. * Get the path to the certificate bundle for this user
  51. *
  52. * @param string $uid (optional) user to get the certificate bundle for, use `null` to get the system bundle (since 9.0.0)
  53. * @return string
  54. * @since 8.0.0
  55. */
  56. public function getCertificateBundle($uid = '');
  57. /**
  58. * Get the full local path to the certificate bundle for this user
  59. *
  60. * @param string $uid (optional) user to get the certificate bundle for, use `null` to get the system bundle
  61. * @return string
  62. * @since 9.0.0
  63. */
  64. public function getAbsoluteBundlePath($uid = '');
  65. }