-
-
Notifications
You must be signed in to change notification settings - Fork 622
Expand file tree
/
Copy pathResetPasswordController.php
More file actions
42 lines (33 loc) · 991 Bytes
/
ResetPasswordController.php
File metadata and controls
42 lines (33 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace Statamic\Http\Controllers\CP\Auth;
use Illuminate\Support\Facades\Password;
use Statamic\Auth\Passwords\PasswordReset;
use Statamic\Http\Controllers\ResetPasswordController as Controller;
use Statamic\Http\Middleware\CP\RedirectIfAuthorized;
class ResetPasswordController extends Controller
{
public function __construct()
{
$this->middleware(RedirectIfAuthorized::class);
}
public function broker()
{
$broker = config('statamic.users.passwords.'.PasswordReset::BROKER_RESETS);
if (is_array($broker)) {
$broker = $broker['cp'];
}
return Password::broker($broker);
}
protected function resetFormAction()
{
return route('statamic.cp.password.reset.action');
}
protected function loginPath(): string
{
return cp_route('login');
}
protected function twoFactorChallengeRedirect(): string
{
return cp_route('two-factor-challenge');
}
}