invalidate sessions when the password is changed - json auth adapter

This commit is contained in:
Milos Stojanovic
2021-07-05 14:49:12 +02:00
parent f237bd4aa8
commit 0de9e6c895
3 changed files with 24 additions and 1 deletions

View File

@@ -34,6 +34,12 @@ class MockUsers extends JsonFile implements Service, AuthInterface
return $this->users_array = $users;
}
public function user(): ?User
{
return $this->session ? $this->session->get(self::SESSION_KEY, null) : null;
}
private function addMockUsers()
{
$guest = new User();
@@ -69,4 +75,5 @@ class MockUsers extends JsonFile implements Service, AuthInterface
$this->add($john, 'john123');
$this->add($jane, 'jane123');
}
}