Table of Contents

Class WebSessionEntity

Namespace
FishMMO.Database.Npgsql.Entities
Assembly
FishMMO-DB.dll

A browser session for the Control Panel.

public class WebSessionEntity
Inheritance
WebSessionEntity
Inherited Members

Remarks

Deliberately separate from AuthTokenEntity. That table's rows are game tokens issued by a LoginServer and carry a foreign key to login_servers; the Control Panel is not a login server, has no row to point at, and its sessions must not be accepted by a World or Scene server that validates game tokens.

Only the SHA-256 of the session identifier is stored, so a database read does not yield usable sessions.

Properties

AccessLevelAtIssue

The account's access level when the session was issued. Compared against the account's current level on every request so a demotion takes effect immediately rather than at the session's next renewal.

public byte AccessLevelAtIssue { get; set; }

Property Value

byte

AccountName

Account this session authenticates, matching accounts.name.

public string AccountName { get; set; }

Property Value

string

CreatedUtc

When the session was created.

public DateTime CreatedUtc { get; set; }

Property Value

DateTime

ExpiresUtc

Absolute expiry, independent of activity.

public DateTime ExpiresUtc { get; set; }

Property Value

DateTime

ID

Surrogate key.

public long ID { get; set; }

Property Value

long

IpAddress

Client address the session was issued to, for the operator's own session list.

public string IpAddress { get; set; }

Property Value

string

LastSeenUtc

Last request on this session; drives the idle timeout.

public DateTime LastSeenUtc { get; set; }

Property Value

DateTime

LastStepUpUtc

When the operator last re-proved possession of their authenticator, or null if never. Drives the step-up window on destructive actions.

public DateTime? LastStepUpUtc { get; set; }

Property Value

DateTime?

Revoked

Whether the session has been explicitly revoked.

public bool Revoked { get; set; }

Property Value

bool

SessionHash

Lowercase hex SHA-256 of the opaque session identifier held by the browser cookie. The identifier itself is never stored.

public string SessionHash { get; set; }

Property Value

string

TwoFactorSatisfied

Whether two-factor has been satisfied. A session that has authenticated by password but not yet by code exists in this table with the flag clear and can do nothing else.

public bool TwoFactorSatisfied { get; set; }

Property Value

bool

UserAgent

Truncated user agent, for the operator's own session list.

public string UserAgent { get; set; }

Property Value

string

Version

PostgreSQL xmin exposed as an EF concurrency token, matching every other versioned entity in this schema.

public uint Version { get; set; }

Property Value

uint