Merge pull request #2981 from nextcloud/backport-2854-2fa-redirect-url
[stable11] Set redirect_url on 2FA challenge page
This commit is contained in:
commit
120009f7a5
|
@ -128,6 +128,7 @@ class TwoFactorChallengeController extends Controller {
|
||||||
'provider' => $provider,
|
'provider' => $provider,
|
||||||
'backupProvider' => $backupProvider,
|
'backupProvider' => $backupProvider,
|
||||||
'logout_attribute' => $this->getLogoutAttribute(),
|
'logout_attribute' => $this->getLogoutAttribute(),
|
||||||
|
'redirect_url' => $redirect_url,
|
||||||
'template' => $tmpl->fetchPage(),
|
'template' => $tmpl->fetchPage(),
|
||||||
];
|
];
|
||||||
return new TemplateResponse($this->appName, 'twofactorshowchallenge', $data, 'guest');
|
return new TemplateResponse($this->appName, 'twofactorshowchallenge', $data, 'guest');
|
||||||
|
|
|
@ -143,6 +143,7 @@ class TwoFactorChallengeControllerTest extends TestCase {
|
||||||
'backupProvider' => $backupProvider,
|
'backupProvider' => $backupProvider,
|
||||||
'logout_attribute' => 'logoutAttribute',
|
'logout_attribute' => 'logoutAttribute',
|
||||||
'template' => '<html/>',
|
'template' => '<html/>',
|
||||||
|
'redirect_url' => '/re/dir/ect/url',
|
||||||
], 'guest');
|
], 'guest');
|
||||||
|
|
||||||
$this->assertEquals($expected, $this->controller->showChallenge('myprovider', '/re/dir/ect/url'));
|
$this->assertEquals($expected, $this->controller->showChallenge('myprovider', '/re/dir/ect/url'));
|
||||||
|
|
Loading…
Reference in New Issue