summaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/TwoFactorAuth
Commit message (Collapse)AuthorAgeFilesLines
* Allow 2FA to be setup on first loginRoeland Jago Douma2019-05-171-0/+19
| | | | | | | | | Once 2FA is enforced for a user and they have no 2FA setup yet this will now prompt them with a setup screen. Given that providers are enabled that allow setup then. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make it possible to enforce mandatory 2FA for groupsChristoph Wurst2018-10-153-34/+216
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Generate backups code notification if not enable but 2fa isRoeland Jago Douma2018-10-011-1/+27
| | | | | | | | | | | | Generate a notification to generate backup codes if you enable an other 2FA provider but backup codes are not yet generated. * Add event listner * Insert background job * Background job tests and emits notification every 2 weeks * If the backup codes are generated the next run will remove the job Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add mandatory 2FA service/classChristoph Wurst2018-09-302-0/+114
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Only allow 2FA state changs if providers support the operationChristoph Wurst2018-09-254-28/+176
| | | | | | | | Ref https://github.com/nextcloud/server/issues/11019. Add `twofactorauth:cleanup` command Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused importChristoph Wurst2018-08-101-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix 2FA being enforced if only backup codes provider is activeChristoph Wurst2018-08-101-0/+27
| | | | | | Fixes https://github.com/nextcloud/server/issues/10634. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix double-inserts of the same provider stateChristoph Wurst2018-08-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add integration/unit test for the double-insert of same valuesChristoph Wurst2018-08-091-0/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Rename providerset method to get primary providersChristoph Wurst2018-08-081-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix login redirection if only one 2FA provider is activeChristoph Wurst2018-08-081-0/+18
| | | | | | Fixes https://github.com/nextcloud/server/issues/10500. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix 2FA provider registry population on loginChristoph Wurst2018-08-081-3/+79
| | | | | | | | If the 2FA provider registry has not been populated yet, we have to make sure all available providers are loaded and queried on login. Otherwise previously active 2FA providers aren't detected as enabled. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix duplicate inserts in the 2fa provider registry DAOChristoph Wurst2018-07-311-0/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make new classes strict and fix license headerChristoph Wurst2018-06-253-4/+22
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make 2FA providers statefulChristoph Wurst2018-06-205-136/+451
| | | | | | | | | | | This adds persistence to the Nextcloud server 2FA logic so that the server knows which 2FA providers are enabled for a specific user at any time, even when the provider is not available. The `IStatefulProvider` interface was added as tagging interface for providers that are compatible with this new API. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add all parameters to returnValueMapJulius Härtl2018-01-311-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix testsRoeland Jago Douma2018-01-251-4/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix AppPassword 2FA authRoeland Jago Douma2017-09-121-1/+16
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix login with basic authRoeland Jago Douma2017-09-051-1/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Improve 2FARoeland Jago Douma2017-08-291-17/+189
| | | | | | | | * Store the auth state in the session so we don't have to query it every time. * Added some tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2017-05-181-4/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Don't do a recursive searchJoas Schilling2017-03-221-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix 2fa activities testsChristoph Wurst2016-12-201-4/+77
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* bring back remember-meChristoph Wurst2016-11-021-2/+27
| | | | | | | | | | * try to reuse the old session token for remember me login * decrypt/encrypt token password and set the session id accordingly * create remember-me cookies only if checkbox is checked and 2fa solved * adjust db token cleanup to store remembered tokens longer * adjust unit tests Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Do not use underscores in PSR4 namespaces of the backup codes appChristoph Wurst2016-10-031-3/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix getMock AuthenticationRoeland Jago Douma2016-09-061-5/+5
|
* add 2fa backup codes appChristoph Wurst2016-09-051-12/+72
| | | | | * add backup codes app unit tests * add integration tests for the backup codes app
* prevent infinite redirect loops if the there is no 2fa provider to passChristoph Wurst2016-08-241-4/+41
| | | | | | | This fixes infinite loops that are caused whenever a user is about to solve a 2FA challenge, but the provider app is disabled at the same time. Since the session value usually indicates that the challenge needs to be solved before we grant access we have to remove that value instead in this special case.
* assert app is loaded in unit testsChristoph Wurst2016-06-161-0/+7
|
* load 2FA provider apps before querying classesChristoph Wurst2016-06-161-1/+4
|
* fail hard if 2fa provider can not be loaded (#25061)Christoph Wurst2016-06-131-3/+24
|
* One more PSR-4 fix (#24852)Joas Schilling2016-05-261-0/+187