Table of Contents

Struct WebSessionData

Namespace
FishMMO.Database.Data
Assembly
FishMMO-DB.dll

A Control Panel browser session, as read back from the database.

public readonly struct WebSessionData
Inherited Members

Remarks

Carries no secret: the session identifier itself is never stored, only its SHA-256. A copy of this struct is safe to hold after the database context is disposed.

Constructors

WebSessionData(long, string, byte, bool, DateTime?, DateTime, DateTime, DateTime, bool, string, string)

Creates a session record.

public WebSessionData(long id, string accountName, byte accessLevelAtIssue, bool twoFactorSatisfied, DateTime? lastStepUpUtc, DateTime createdUtc, DateTime lastSeenUtc, DateTime expiresUtc, bool revoked, string ipAddress, string userAgent)

Parameters

id long
accountName string
accessLevelAtIssue byte
twoFactorSatisfied bool
lastStepUpUtc DateTime?
createdUtc DateTime
lastSeenUtc DateTime
expiresUtc DateTime
revoked bool
ipAddress string
userAgent string

Fields

AccessLevelAtIssue

Access level recorded when the session was issued.

public readonly byte AccessLevelAtIssue

Field Value

byte

AccountName

Account the session authenticates.

public readonly string AccountName

Field Value

string

CreatedUtc

When the session was created.

public readonly DateTime CreatedUtc

Field Value

DateTime

ExpiresUtc

Absolute expiry, independent of activity.

public readonly DateTime ExpiresUtc

Field Value

DateTime

ID

Surrogate key, used by the operator's own session list.

public readonly long ID

Field Value

long

IpAddress

Address the session was issued to.

public readonly string IpAddress

Field Value

string

LastSeenUtc

Last activity, driving the idle timeout.

public readonly DateTime LastSeenUtc

Field Value

DateTime

LastStepUpUtc

When the operator last re-proved their authenticator, or null.

public readonly DateTime? LastStepUpUtc

Field Value

DateTime?

Revoked

Whether the session has been revoked.

public readonly bool Revoked

Field Value

bool

TwoFactorSatisfied

Whether two-factor has been satisfied on this session.

public readonly bool TwoFactorSatisfied

Field Value

bool

UserAgent

Truncated user agent the session was issued to.

public readonly string UserAgent

Field Value

string