Ferdinand Thiessen
d6d6747a73
refactor: apply rector rules for PHPUnit 10
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
4 months ago
Carl Schwan
49d522717c
refactor(dbal): Port away from remaining IQueryBuilder::execute calls
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
4 months ago
Robin Appelman
aa15f9d16d
chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
8 months ago
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
8 months ago
Richard Steinmetz
246da73a36
fix(oauth2): retain support for legacy ownCloud clients
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
1 year ago
Côme Chilliet
64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
75f8bb51ed
fix: Rename config option to skipAuthPickerApplications to match what it does
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
cca0e84480
feat(oauth2): Add a test for skipping auth page
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
99e0867f0a
chore: Adapt tests to added constructor parameters
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
1580c8612b
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
1a4978c4ea
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
1 year ago
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 year ago
Julien Veyssier
120e7e838c
fix(oauth2): fix tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 year ago
Julien Veyssier
034917b790
fix(oauth2): store hashed secret instead of encrypted
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 year ago
Artur Neumann
84ee79fe43
fix: expect invalidateTokensOfUser only be called for seen users
Signed-off-by: Artur Neumann <artur@jankaritech.com>
3 years ago
Andy Scherzinger
cc1686dba9
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2 years 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>
2 years ago
Julien Veyssier
32f984c520
adjust oauth tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2 years ago
Julien Veyssier
c6da99474e
rename oauth2_access_token's created_at to code_created_at
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2 years ago
Julien Veyssier
ddfc124767
add test for refusing to get an oauth token from a code when we're not in authorization state
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2 years ago
Julien Veyssier
2995b0948f
add tests for oauth2 authorization code expiration
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
3 years ago
Julien Veyssier
807f173dec
make oauth2 authorization code expire after 10 minutes
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
3 years ago
Joas Schilling
25309bcb45
techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Julien Veyssier
629adc318f
add bruteforce protection in OauthApiController
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
3 years ago
Julien Veyssier
8086d7e41b
add test that inserts a long oauth client secret
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
3 years ago
Julien Veyssier
808819a4d0
fix oauth2 tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
3 years ago
Julien Veyssier
18c742a901
encrypt oauth2 client secrets
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
3 years ago
Artur Neumann
e97540b9c6
move mocks into private variables
Signed-off-by: Artur Neumann <artur@jankaritech.com>
3 years ago
Artur Neumann
707e69b203
adjust SettingsController tests
Signed-off-by: Artur Neumann <artur@jankaritech.com>
3 years ago
Artur Neumann
21be557e2a
invalidate existing tokens when deleting an oauth client
Signed-off-by: Artur Neumann <artur@jankaritech.com>
3 years ago
Côme Chilliet
9b26c4a277
Fix PHP error on PHP >= 8.2 about dynamic property use in tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Côme Chilliet
539162ba8b
Remove at matchers from tests in:
* apps/oauth2
* tests/Test/Repair/Owncloud
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Carl Schwan
53db418ee9
Cleanup oauth2 admin settings
- Use more vue components
- Add link to doc
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Joas Schilling
617528312a
Fix last tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Joas Schilling
c6ae53096c
More test fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
5 years ago
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Joas Schilling
39131519b2
Make the test pass on repeating calls
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Daniel Kesselberg
509af24bc9
Fix invalid instantiation of TemplateResponse if client not found
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* 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>
6 years ago
Roeland Jago Douma
9e2bb5ef36
Move oauth admin settings to initialstate
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
6 years ago
Roeland Jago Douma
470318db36
Fix the actual oauth2 tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago