Session constructor
Session({
- required Server server,
- String? authenticationKey,
- HttpRequest? httpRequest,
- WebSocket? webSocket,
- required bool enableLogging,
Creates a new session. This is typically done internally by the Server.
Implementation
Session({
required this.server,
String? authenticationKey,
HttpRequest? httpRequest,
WebSocket? webSocket,
required this.enableLogging,
}) {
_startTime = DateTime.now();
auth = UserAuthentication._(this);
storage = StorageAccess._(this);
messages = MessageCentralAccess._(this);
// ignore: deprecated_member_use_from_same_package
db = DatabaseLegacy(session: this);
dbNext = Database(session: this);
sessionLogs = server.serverpod.logManager.initializeSessionLog(this);
sessionLogs.temporarySessionId =
serverpod.logManager.nextTemporarySessionId();
}