aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/User/SessionTest.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: run rector on tests with new rulerector-testsRobin Appelman2025-06-121-10/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: run rector on testsRobin Appelman2025-06-121-3/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test: Fix tests/lib/[S-Z]*Joas Schilling2025-05-151-26/+26
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(session): Only mark sessions of permanent tokens as app passwordsfix/session/permanent-token-app-passwordChristoph Wurst2025-04-031-0/+40
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(users): Don't crash if disabled user is missing in the databaseartonge/fix/prevent_missing_users_from_crashing_disabled_users_searchLouis Chemineau2024-09-231-0/+9
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-25/+25
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(session): Log when session_* calls are slowChristoph Wurst2024-08-071-14/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-4/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(session): Do not update authtoken last_check for passwordlessChristoph Wurst2024-04-261-0/+78
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(session): Avoid two useless authtoken DB queries for every anonymous requestGit'Fellow2024-01-171-0/+50
| | | | | | Co-Authored-By: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* perf: Use more performant way to obtain and check the email as a login name ↵Julius Härtl2023-11-301-1/+1
| | | | | | with token login Signed-off-by: Julius Härtl <jus@bitgrid.net>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25Joas Schilling2023-08-281-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix!: Remove symfony EventDispatcherInterface from UserJoas Schilling2023-07-271-11/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(dav): Abort requests with 429 instead of waitingJoas Schilling2023-05-031-5/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adapt tests to config value typingCôme Chilliet2023-04-051-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(tests): add tests for handleLoginFailedDaniel Kesselberg2023-03-101-0/+97
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix dynamic property creations in test filesCôme Chilliet2022-08-011-0/+2
| | | | | | This fixes warnings in PHP 8.2 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate from ILogger to LoggerInterface where needed in the testsCôme Chilliet2022-03-241-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix testsJoas Schilling2022-02-231-45/+50
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove unused importsJoas Schilling2021-12-021-2/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix testsCarl Schwan2021-12-011-420/+0
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix unit testsJoas Schilling2021-11-121-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Cache the user backend info for 300sJoas Schilling2021-02-151-7/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix more testsJoas Schilling2020-10-131-2/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix unit testsJoas Schilling2020-08-191-10/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-80/+80
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add typed create user eventsChristoph Wurst2019-12-031-13/+39
| | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-12/+12
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * 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>
* Fix the tests after #18029Roeland Jago Douma2019-11-211-2/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make the post login event publicChristoph Wurst2019-11-201-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make renewSessionToken return the new tokenRoeland Jago Douma2019-10-091-10/+9
| | | | | | | Avoids directly getting the token again. We just inserted it so it and have all the info. So that query is just a waste. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update testsRoeland Jago Douma2019-07-291-44/+71
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-011-14/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add testsRoeland Jago Douma2018-10-021-0/+57
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mark token as invalid if the password doesn't matchRoeland Jago Douma2018-10-021-4/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix session testsRoeland Jago Douma2018-05-151-2/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2018-01-231-45/+50
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use ::class in test mocksMorris Jobke2017-10-241-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix SessionTestRoeland Jago Douma2017-08-091-0/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Adjust token nameLukas Reschke2017-05-181-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Save the scope of an auth token in the sessionRobin Appelman2017-04-051-29/+36
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix testsJoas Schilling2017-01-051-1/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Set last-login-check on basic authRoeland Jago Douma2016-12-051-0/+101
| | | | | | | | | Else the last-login-check fails hard because the session value is not set and thus defaults to 0. * Started with tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* fix parameter orderChristoph Wurst2016-11-281-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* do not remember session tokens by defaultChristoph Wurst2016-11-271-3/+43
| | | | | | | | We have to respect the value of the remember-me checkbox. Due to an error in the source code the default value for the session token was to remember it. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>