implemented user logout

This commit is contained in:
2024-07-22 11:35:37 +02:00
parent 3c4116453b
commit 59b9976dbf
10 changed files with 73 additions and 24 deletions

View File

@@ -143,6 +143,9 @@ public class FileStore implements ClientService, SessionService, UserService {
/*** Session Service Methods ***/
// TODO: prolong session on user activity
// TODO: drop expired sessions
@Override
public Session createSession(User user) {
var now = Instant.now();
@@ -152,7 +155,9 @@ public class FileStore implements ClientService, SessionService, UserService {
@Override
public SessionService dropSession(String sessionId) {
return null;
json.getJSONObject(SESSIONS).remove(sessionId);
save();
return this;
}
@Override