ICloudIdManager.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017, Robin Appelman <robin@icewind.nl>
  4. *
  5. * @license GNU AGPL version 3 or any later version
  6. *
  7. * This code is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU Affero General Public License, version 3,
  9. * as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License, version 3,
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>
  18. *
  19. */
  20. namespace OCP\Federation;
  21. /**
  22. * Interface for resolving federated cloud ids
  23. *
  24. * @since 12.0.0
  25. */
  26. interface ICloudIdManager {
  27. /**
  28. * @param string $cloudId
  29. * @return ICloudId
  30. *
  31. * @since 12.0.0
  32. */
  33. public function resolveCloudId($cloudId);
  34. /**
  35. * Get the cloud id for a remote user
  36. *
  37. * @param string $user
  38. * @param string $remote
  39. * @return ICloudId
  40. *
  41. * @since 12.0.0
  42. */
  43. public function getCloudId($user, $remote);
  44. /**
  45. * Check if the input is a correctly formatted cloud id
  46. *
  47. * @param string $cloudId
  48. * @return bool
  49. *
  50. * @since 12.0.0
  51. */
  52. public function isValidCloudId($cloudId);
  53. }