aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/Token/DefaultTokenProviderTest.php
Commit message (Collapse)AuthorAgeFilesLines
* More unit test adjustmentsJoas Schilling2021-12-011-552/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use PSR logger in authenticationJoas Schilling2020-10-121-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-10/+10
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | 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>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-11/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-9/+9
| | | | 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>
* Move ExpiredTokenException to the correct namespaceRoeland Jago Douma2018-10-301-2/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add testsRoeland Jago Douma2018-10-021-0/+19
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use constant for token versionRoeland Jago Douma2018-06-181-0/+1
| | | | | | | And don't set the version in the constructor. That would possible cause to many updates. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* SetPassword on PublicKeyTokensRoeland Jago Douma2018-06-181-6/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Certain tokens can expireRoeland Jago Douma2018-05-171-0/+75
| | | | | | | | However due to the nature of what we store in the token (encrypted passwords etc). We can't just delete the tokens because that would make the oauth refresh useless. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow the rotation of tokensRoeland Jago Douma2018-05-161-0/+42
| | | | | | This for example will allow rotating the apptoken for oauth Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2018-05-151-5/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Adjust tests for added lastCheck timeLukas Reschke2017-11-271-0/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix duplicate session token after remembered loginChristoph Wurst2017-09-201-0/+8
| | | | | | | | | On a remembered login session, we create a new session token in the database with the values of the old one. As we actually don't need the old session token anymore, we can delete it right away. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix warning with undefined methodJoas Schilling2017-04-201-4/+4
| | | | | | | | Trying to configure method "getRemember" which cannot be configured because it does not exist, has not been specified, is final, or is static Signed-off-by: Joas Schilling <coding@schilljs.com>
* DefaultTokenProviderTest mocked/asserted the wrong methodChristoph Wurst2017-02-281-2/+2
| | | | | | | It's 'getRemember' instead of 'getRememberMe', hence some warnings were generated by phpunit. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* copy remember-me value when renewing a session tokenChristoph Wurst2016-11-271-1/+11
| | | | | | | | | On renew, a session token is duplicated. For some reason we did not copy over the remember-me attribute value. Hence, the new token was deleted too early in the background job and remember-me did not work properly. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Adds TokenProvider and Mapper testsRoeland Jago Douma2016-11-161-0/+23
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add missing tests and fix PHPDocLukas Reschke2016-11-021-2/+116
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* bring back remember-meChristoph Wurst2016-11-021-6/+12
| | | | | | | | | | * try to reuse the old session token for remember me login * decrypt/encrypt token password and set the session id accordingly * create remember-me cookies only if checkbox is checked and 2fa solved * adjust db token cleanup to store remembered tokens longer * adjust unit tests Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix getMock AuthenticationRoeland Jago Douma2016-09-061-7/+12
|
* Merge pull request #25172 from owncloud/token-login-validationVincent Petry2016-06-221-27/+12
|\ | | | | Token login validation
| * fix default token provider testsChristoph Wurst2016-06-201-26/+0
| |
| * use token last_activity instead of session valueChristoph Wurst2016-06-171-1/+12
| |
* | update session token password on user password changeChristoph Wurst2016-06-211-0/+33
|/
* Create session tokens for apache auth usersChristoph Wurst2016-05-311-0/+11
|
* when generating browser/device token, save the login name for later password ↵Christoph Wurst2016-05-241-1/+3
| | | | checks
* add button to invalidate browser sessions/device tokensChristoph Wurst2016-05-231-0/+11
|
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-0/+212
* Move a-b to PSR-4 * Move c-d to PSR-4 * Move e+g to PSR-4 * Move h-l to PSR-4 * Move m-r to PSR-4 * Move s-u to PSR-4 * Move files/ to PSR-4 * Move remaining tests to PSR-4 * Remove Test\ from old autoloader