aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/Token/ManagerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-25/+25
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-19/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Add tests for occ user:auth-tokens:deleteLucas Azevedo2023-08-251-0/+8
| | | | Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
* unit tests for Manager::invalidateTokensOfUserArtur Neumann2023-03-141-0/+44
| | | | Signed-off-by: Artur Neumann <artur@jankaritech.com>
* Automatically cut the token name on the first levelJoas Schilling2022-03-231-0/+31
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* More test fixingJoas Schilling2021-12-011-2/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* More test fixingJoas Schilling2021-12-011-203/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use a blank line after the opening tagChristoph Wurst2020-04-091-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused importsChristoph Wurst2020-03-251-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Handle token insert conflictsChristoph Wurst2019-11-261-10/+44
| | | | | | | | | | | | | | | | Env-based SAML uses the "Apache auth" mechanism to log users in. In this code path, we first delete all existin auth tokens from the database, before a new one is inserted. This is problematic for concurrent requests as they might reach the same code at the same time, hence both trying to insert a new row wit the same token (the session ID). This also bubbles up and disables user_saml. As the token might still be OK (both request will insert the same data), we can actually just check if the UIDs of the conflict row is the same as the one we want to insert right now. In that case let's just use the existing entry and carry on. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-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>
* Add testsRoeland Jago Douma2018-10-021-0/+41
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add more testsRoeland Jago Douma2018-06-181-0/+451
* Add a lot of tests * Fixes related to those tests * Fix tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>