summaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/TwoFactorChallengeControllerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Properly allow \OCP\Authentication\IApacheBackend to specify logout URLLukas Reschke2017-08-301-4/+4
| | | | | | | | | | | | | | | | | | | | Any `\OCP\Authentication\IApacheBackend` previously had to implement `getLogoutAttribute` which returns a string. This string is directly injected into the logout `<a>` tag, so returning something like `href="foo"` would result in `<a href="foo">`. This is rather error prone and also in Nextcloud 12 broken as the logout entry has been moved with 054e161eb5f4a5c5c13ee322ae8e93ce66f01b13 inside the navigation manager where one cannot simply inject attributes. Thus this feature is broken in Nextcloud 12 which effectively leads to the bug described at nextcloud/user_saml#112, people cannot logout anymore when using SAML using SLO. Basically in case of SAML you have a SLO url which redirects you to the IdP and properly logs you out there as well. Instead of monkey patching the Navigation manager I decided to instead change `\OCP\Authentication\IApacheBackend` to use `\OCP\Authentication\IApacheBackend::getLogoutUrl` instead where it can return a string with the appropriate logout URL. Since this functionality is only prominently used in the SAML plugin. Any custom app would need a small change but I'm not aware of any and there's simply no way to fix this properly otherwise. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* fix coding style and increase code coverageChristoph Wurst2017-01-111-40/+111
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix testsCornelius Kölbel2017-01-111-2/+5
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Set redirect_url on 2FA challenge pageChristoph Wurst2016-12-231-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add 2fa backup codes appChristoph Wurst2016-09-051-0/+19
| | | | | * add backup codes app unit tests * add integration tests for the backup codes app
* check same URL in unit testsChristoph Wurst2016-08-301-11/+12
|
* redirect to default app after solving the 2FA challengeChristoph Wurst2016-08-301-6/+1
|
* Allow to cancel 2FA after loginJoas Schilling2016-06-071-4/+17
|
* remember redirect_url when solving the 2FA challengeChristoph Wurst2016-06-011-5/+7
|
* Move parallel merged auth tests to PSR-4Joas Schilling2016-05-251-0/+220