Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-02-03 13:13:25 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2021-02-10 21:02:37 +0300
commitcd457cc68bf72b402b7757d4f039af48f1ac3d3f (patch)
tree924faa8f7b684311477fff3a2e2a9bff0fb79f04 /tests/lib/Authentication
parent3e35d2c394f65d327ac90dd83bacecd0b6a035bf (diff)
Always renew apppasswords on login
Else you can end up that you renewed your password (LDAP for example). But they still don't work because you did not use them before you logged in. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Authentication')
-rw-r--r--tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
index 04e0fdb527e..f27100b5d78 100644
--- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
@@ -548,8 +548,7 @@ class PublicKeyTokenProviderTest extends TestCase {
IToken::PERMANENT_TOKEN,
IToken::REMEMBER);
- $this->mapper->expects($this->once())
- ->method('hasExpiredTokens')
+ $this->mapper->method('hasExpiredTokens')
->with($uid)
->willReturn(true);
$this->mapper->expects($this->once())
@@ -564,19 +563,4 @@ class PublicKeyTokenProviderTest extends TestCase {
$this->tokenProvider->updatePasswords($uid, 'bar2');
}
-
- public function testUpdatePasswordsNotRequired() {
- $uid = 'myUID';
-
- $this->mapper->expects($this->once())
- ->method('hasExpiredTokens')
- ->with($uid)
- ->willReturn(false);
- $this->mapper->expects($this->never())
- ->method('getTokenByUser');
- $this->mapper->expects($this->never())
- ->method('update');
-
- $this->tokenProvider->updatePasswords($uid, 'bar2');
- }
}