1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @author Jörn Friedrich Dreyer <[email protected]> |
4
|
|
|
* |
5
|
|
|
* @copyright Copyright (c) 2018, ownCloud GmbH |
6
|
|
|
* @license AGPL-3.0 |
7
|
|
|
* |
8
|
|
|
* This code is free software: you can redistribute it and/or modify |
9
|
|
|
* it under the terms of the GNU Affero General Public License, version 3, |
10
|
|
|
* as published by the Free Software Foundation. |
11
|
|
|
* |
12
|
|
|
* This program is distributed in the hope that it will be useful, |
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
* GNU Affero General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3, |
18
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/> |
19
|
|
|
* |
20
|
|
|
*/ |
21
|
|
|
|
22
|
|
|
namespace OC\Authentication\Exceptions; |
23
|
|
|
|
24
|
|
|
use Exception; |
25
|
|
|
use OCP\AppFramework\Http\RedirectResponse; |
26
|
|
|
|
27
|
|
|
class AccountCheckException extends Exception { |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var RedirectResponse |
31
|
|
|
*/ |
32
|
|
|
private $redirectResponse; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* AccountCheckException constructor. |
36
|
|
|
* |
37
|
|
|
* @param RedirectResponse $redirectResponse |
38
|
|
|
* @param string $message |
39
|
|
|
* @param int $code |
40
|
|
|
* @param \Throwable|null $previous |
41
|
|
|
*/ |
42
|
|
|
public function __construct(RedirectResponse $redirectResponse, $message = '', $code = 0, \Throwable $previous = null) { |
43
|
|
|
parent::__construct($message, $code, $previous); |
44
|
|
|
$this->redirectResponse = $redirectResponse; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @return RedirectResponse |
49
|
|
|
*/ |
50
|
|
|
public function getRedirectResponse() { |
51
|
|
|
return $this->redirectResponse; |
52
|
|
|
} |
53
|
|
|
} |
54
|
|
|
|