Commit Graph

22 Commits (ec5133b739eabc76271789504b4dbb91a534f552)

Author SHA1 Message Date
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 months ago
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
6 months ago
Christoph Wurst d0d903c0f1
Allow admins to disable 2FA backup codes via occ
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
J0WI 899413b506 Format header
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
3 years ago
J0WI 09368e7cf5 2FA backupcodes: add strict typing
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
3 years ago
Morris Jobke a5853d7ecc
Use dispatchTyped instead of dispatch on the new event dispatcher
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Roeland Jago Douma d878130fb2
Only human readbale backup chars
Fixes #14811
Only use humand readable chars (so no I and 1 etc)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Christoph Wurst 3174012adf Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
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>
6 years ago
Morris Jobke 870fe20acc
Use $var[] = $a instead of array_push - 2x faster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Christoph Wurst 58683f11ac
Publish 2fa backup codes activities to the right stream
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
7 years ago
Christoph Wurst 6726c98bbd
use constant and clean up unit test
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
7 years ago
Christoph Wurst 3b76699c9c
Increase 2fa backup codes entropy
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
7 years ago
Christoph Wurst 5bad93472d
catch specific BadMethodCallException
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
8 years ago
Christoph Wurst ed4017dfb4
fix minor issues
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
8 years ago
Christoph Wurst 9300312046
push activity when backup codes are generated
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
8 years ago
Christoph Wurst f27b7fa8d1
Do not use underscores in PSR4 namespaces of the backup codes app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
8 years ago
Christoph Wurst 8acb734854
add 2fa backup codes app
* add backup codes app unit tests
* add integration tests for the backup codes app
8 years ago