1<?php
2
3declare(strict_types=1);
4
5/**
6 * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
7 *
8 * @author Roeland Jago Douma <roeland@famdouma.nl>
9 *
10 * @license GNU AGPL version 3 or any later version
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Affero General Public License as
14 * published by the Free Software Foundation, either version 3 of the
15 * License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Affero General Public License for more details.
21 *
22 * You should have received a copy of the GNU Affero General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 */
26namespace OC\Core\Data;
27
28class LoginFlowV2Credentials implements \JsonSerializable {
29	/** @var string */
30	private $server;
31	/** @var string */
32	private $loginName;
33	/** @var string */
34	private $appPassword;
35
36	public function __construct(string $server, string $loginName, string $appPassword) {
37		$this->server = $server;
38		$this->loginName = $loginName;
39		$this->appPassword = $appPassword;
40	}
41
42	/**
43	 * @return string
44	 */
45	public function getServer(): string {
46		return $this->server;
47	}
48
49	/**
50	 * @return string
51	 */
52	public function getLoginName(): string {
53		return $this->loginName;
54	}
55
56	/**
57	 * @return string
58	 */
59	public function getAppPassword(): string {
60		return $this->appPassword;
61	}
62
63	public function jsonSerialize(): array {
64		return [
65			'server' => $this->server,
66			'loginName' => $this->loginName,
67			'appPassword' => $this->appPassword,
68		];
69	}
70}
71