Commit Graph

14 Commits

Author SHA1 Message Date
Christoph Wurst 91e7f12088
Adjust apps' code to use the ContainerInterface
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-21 20:43:18 +02:00
Christoph Wurst a2c8bfadbc
Migrate Two-Factor Backup Codes to new bootstrap mechanism
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:22 +02:00
Christoph Wurst 69571fb536
Add dedicated API for apps' bootstrapping process
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:21 +02:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Joas Schilling 55f5bc79a1
Keep the old method as a fallback and adjust the tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-16 11:36:32 +02:00
Joas Schilling a386ecec8c
Update twofactor_backupcodes Notifier
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-15 15:12:43 +02:00
Christoph Wurst 3174012adf Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-06-25 10:02:27 +02:00
Roeland Jago Douma 1c29a01956
Clear backupcodes reminder if no 2FA is enabled
Fixes #14125

Listen to 2FA disable event. If a provider is disabled for a user. We
check if there are no more providers. If there are no more providers we
Remove the backupcode reminder notification (if still present).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-05 20:14:16 +01:00
Roeland Jago Douma c557314262
Clear notification to generate backup code once codes are generated
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-01 15:35:25 +02:00
Roeland Jago Douma 956fe1b867
Generate backups code notification if not enable but 2fa is
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>
2018-10-01 15:35:25 +02:00
Christoph Wurst f8fe7488a5
Fix state propragation of the backup codes provider
Starting with Nextcloud 14, the server knows the enabled/disabled
state of 2fa providers. While it will query that information if it's
unknown (on first use), it won't notice any changes. Thus, providers
have to propagate that information themselves.

Ref https://github.com/nextcloud/twofactor_totp/pull/263
Ref https://github.com/nextcloud/twofactor_u2f/pull/210

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-08-01 21:21:30 +02:00
Arthur Schiwon f6ecc46cfa
adapt twofactore_backupcodes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-23 12:38:05 +02:00
Joas Schilling cd79eb1b2c
Remove 2FA backup codes on user deletion
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-15 13:31:30 +02:00