summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update license headersChristoph Wurst2019-12-0523-35/+106
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-226-6/+6
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only human readbale backup charsRoeland Jago Douma2019-10-221-1/+1
| | | | | | | Fixes #14811 Only use humand readable chars (so no I and 1 etc) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unused backupscode functionRoeland Jago Douma2019-09-121-9/+0
| | | | | | We use the initial state API so no need for this anymore. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #15040 from ↵Morris Jobke2019-07-172-11/+22
|\ | | | | | | | | nextcloud/feature/13980/push-for-deleted-notifications Notifications overhaul
| * Keep the old method as a fallback and adjust the testsJoas Schilling2019-07-161-1/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Update twofactor_backupcodes NotifierJoas Schilling2019-07-152-11/+22
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add icon to twofactor_backupcodes notificationJan-Christoph Borchardt2019-07-161-0/+3
| | | | | | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Fix wording of backupcodes notificationJan-Christoph Borchardt2019-07-161-1/+1
|/ | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Add event dispatcher to OCPChristoph Wurst2019-06-259-81/+40
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Do not send notification if no active 2faRoeland Jago Douma2019-03-051-1/+9
| | | | | | | If the job is still present we should also not fire it off if there is not a single active 2FA provider. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Clear backupcodes reminder if no 2FA is enabledRoeland Jago Douma2019-03-052-0/+72
| | | | | | | | | | 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>
* Add a link to the notification to create the backup codesJoas Schilling2019-02-111-1/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a key parameter to the new initial state APIChristoph Wurst2019-01-301-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Provide initial stateRoeland Jago Douma2019-01-292-13/+12
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Provide initial state for backupcodes in templateRoeland Jago Douma2019-01-152-3/+12
| | | | | | | This saves a direct request to the server when loading the backup codes. There is no need for this as the data is already known. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Switch to OCP background jobsRoeland Jago Douma2019-01-142-6/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Switch to QBMapperRoeland Jago Douma2019-01-141-8/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Consolidate personal two-factor provider settingsChristoph Wurst2018-10-022-55/+23
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add job to check users for backup code remindersRoeland Jago Douma2018-10-022-0/+114
| | | | | | | | | Now that we can enforce 2FA we also should notify users that have enabled 2FA but do not yet have backup codes generated. This adds a repair step that inserts a background job to do this. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Clear notification to generate backup code once codes are generatedRoeland Jago Douma2018-10-012-0/+53
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Generate backups code notification if not enable but 2fa isRoeland Jago Douma2018-10-014-0/+245
| | | | | | | | | | | | 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>
* Fix backup codes column length to fix Argon2 hash valuesChristoph Wurst2018-08-211-0/+51
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix state propragation of the backup codes providerChristoph Wurst2018-08-016-41/+230
| | | | | | | | | | | | 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>
* Make 2FA backupcodes strictRoeland Jago Douma2018-03-261-8/+10
| | | | | | * and follow the interface again Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #8063 from nextcloud/inline-valueJoas Schilling2018-01-261-2/+1
|\ | | | | Return value immediately instead of assigning to a one-time variable
| * Return value immediately instead of assigning to a one-time variableMorris Jobke2018-01-261-2/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use $var[] = $a instead of array_push - 2x fasterMorris Jobke2018-01-251-1/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix the type hints of migrations and correctly inject the wrapped schema ↵Joas Schilling2018-01-174-17/+14
| | | | | | into migrations Signed-off-by: Joas Schilling <coding@schilljs.com>
* Restore the sequencial orderJoas Schilling2017-09-291-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Migrate the twofactor_backupcodes app to bigintJoas Schilling2017-09-291-0/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix database structure of twofactor backupcodes app to match 12Joas Schilling2017-09-191-0/+56
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #5483 from nextcloud/issue-5075-png-files-for-activity-emailsMorris Jobke2017-07-071-7/+12
|\ | | | | Use PNGs for icons in activity emails
| * Use PNG version of the icons for shipped activitiesJoas Schilling2017-06-201-7/+12
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix dropping tables and handle the prefix automaticallyJoas Schilling2017-07-052-8/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Move twofactor_backupcodes to migrationsJoas Schilling2017-07-052-31/+102
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | move encryption to security (and behind two factor things)Arthur Schiwon2017-06-271-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | move twofactor_* into securityArthur Schiwon2017-06-232-99/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | adapt twofactore_backupcodesArthur Schiwon2017-06-233-8/+180
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Publish 2fa backup codes activities to the right streamChristoph Wurst2017-05-181-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change 2FA activities to more generic security activitiesChristoph Wurst2017-05-183-208/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add a update step that copies all the backup codesJoas Schilling2017-05-151-0/+108
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Rename the table to a valid nameJoas Schilling2017-05-151-3/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove 2FA backup codes on user deletionJoas Schilling2017-05-152-1/+73
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Hide 2FA backup codes if no other 2FA providers are enabledChristoph Wurst2017-05-021-1/+40
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* ignore code we're unable to testChristoph Wurst2017-01-181-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* test activity providerChristoph Wurst2017-01-181-0/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* use constant and clean up unit testChristoph Wurst2017-01-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Increase 2fa backup codes entropyChristoph Wurst2017-01-161-1/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix typoChristoph Wurst2016-12-191-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>