LoginFlowV2Credentials.php 844 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Core\Data;
  8. class LoginFlowV2Credentials implements \JsonSerializable {
  9. public function __construct(
  10. private string $server,
  11. private string $loginName,
  12. private string $appPassword,
  13. ) {
  14. }
  15. /**
  16. * @return string
  17. */
  18. public function getServer(): string {
  19. return $this->server;
  20. }
  21. /**
  22. * @return string
  23. */
  24. public function getLoginName(): string {
  25. return $this->loginName;
  26. }
  27. /**
  28. * @return string
  29. */
  30. public function getAppPassword(): string {
  31. return $this->appPassword;
  32. }
  33. public function jsonSerialize(): array {
  34. return [
  35. 'server' => $this->server,
  36. 'loginName' => $this->loginName,
  37. 'appPassword' => $this->appPassword,
  38. ];
  39. }
  40. }