Package io.karatelabs.http
Interface SessionStore
- All Known Implementing Classes:
FileSessionStore,InMemorySessionStore
public interface SessionStore
Interface for session persistence.
Implementations handle creation, retrieval, and storage of user sessions.
-
Method Summary
-
Method Details
-
create
Create a new session with the specified expiry time.- Parameters:
expirySeconds- number of seconds until the session expires- Returns:
- newly created session with unique ID
-
get
Retrieve a session by its ID.- Parameters:
id- the session ID- Returns:
- the session if found and not expired, null otherwise
-
save
Save/update a session in the store.- Parameters:
session- the session to save
-
delete
Delete a session from the store.- Parameters:
id- the session ID to delete
-