summaryrefslogtreecommitdiffstats
path: root/apps/oauth2/tests
Commit message (Collapse)AuthorAgeFilesLines
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* adjust oauth testsJulien Veyssier2023-10-051-2/+3
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* rename oauth2_access_token's created_at to code_created_atJulien Veyssier2023-10-051-9/+9
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* add test for refusing to get an oauth token from a code when we're not in ↵Julien Veyssier2023-10-051-0/+27
| | | | | | authorization state Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* add tests for oauth2 authorization code expirationJulien Veyssier2023-10-051-7/+63
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* make oauth2 authorization code expire after 10 minutesJulien Veyssier2023-10-051-1/+5
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25Joas Schilling2023-08-281-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* add bruteforce protection in OauthApiControllerJulien Veyssier2023-06-191-0/+6
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* add test that inserts a long oauth client secretJulien Veyssier2023-06-141-0/+10
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* fix oauth2 testsJulien Veyssier2023-06-082-25/+53
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* encrypt oauth2 client secretsJulien Veyssier2023-06-072-3/+19
| | | | Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* move mocks into private variablesArtur Neumann2023-03-141-2/+8
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* adjust SettingsController testsArtur Neumann2023-03-141-15/+5
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* invalidate existing tokens when deleting an oauth clientArtur Neumann2023-03-141-5/+57
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* Fix PHP error on PHP >= 8.2 about dynamic property use in testsCôme Chilliet2022-12-191-1/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove at matchers from tests in:Côme Chilliet2022-08-021-7/+4
| | | | | | | * apps/oauth2 * tests/Test/Repair/Owncloud Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Cleanup oauth2 admin settingsCarl Schwan2022-07-141-4/+5
| | | | | | | - Use more vue components - Add link to doc Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix last testsJoas Schilling2021-12-021-7/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* More test fixingJoas Schilling2021-12-011-9/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-046-12/+6
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make the test pass on repeating callsJoas Schilling2020-11-101-2/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-243-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-123-17/+17
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-313-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-252-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix invalid instantiation of TemplateResponse if client not foundDaniel Kesselberg2020-03-151-1/+21
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update license headersChristoph Wurst2019-12-056-7/+25
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-276-15/+15
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-276-6/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-222-2/+2
| | | | | | | | | | | * 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>
* Move oauth admin settings to initialstateRoeland Jago Douma2019-09-282-45/+17
| | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Fix the actual oauth2 testsRoeland Jago Douma2019-07-011-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fail gracefull if an unkown oauth2 client tries to authenticateRoeland Jago Douma2018-12-061-1/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move ExpiredTokenException to the correct namespaceRoeland Jago Douma2018-10-301-3/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Reset bruteforce on token refresh OAuthRoeland Jago Douma2018-10-301-1/+39
| | | | | | | | | | When using atoken obtained via OAuth the token expires. Resulting in brute force attempts hitting the requesting IP. This resets the brute force attempts for that UID on a valid refresh of the token. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update SettingsControllerTest.phprakekniven2018-06-301-1/+1
| | | adapted test for grammar change of URL
* Validate OAuth2 redirect uriRoeland Jago Douma2018-06-261-1/+14
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix AdminTestsRoeland Jago Douma2018-06-191-11/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cleanup ControllerRoeland Jago Douma2018-06-191-6/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2018-06-191-17/+65
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* The OAuth endpoint needs to support Basic AuthRoeland Jago Douma2018-05-291-0/+84
| | | | | | * Add test Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add testsRoeland Jago Douma2018-05-222-40/+324
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Function accepts only integersLukas Reschke2017-05-181-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Delete token after usage in testLukas Reschke2017-05-181-0/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add tests for OAuth2 appLukas Reschke2017-05-186-0/+550
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>