Struct WebSessionData
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
idlongaccountNamestringaccessLevelAtIssuebytetwoFactorSatisfiedboollastStepUpUtcDateTime?createdUtcDateTimelastSeenUtcDateTimeexpiresUtcDateTimerevokedboolipAddressstringuserAgentstring
Fields
AccessLevelAtIssue
Access level recorded when the session was issued.
public readonly byte AccessLevelAtIssue
Field Value
AccountName
Account the session authenticates.
public readonly string AccountName
Field Value
CreatedUtc
When the session was created.
public readonly DateTime CreatedUtc
Field Value
ExpiresUtc
Absolute expiry, independent of activity.
public readonly DateTime ExpiresUtc
Field Value
ID
Surrogate key, used by the operator's own session list.
public readonly long ID
Field Value
IpAddress
Address the session was issued to.
public readonly string IpAddress
Field Value
LastSeenUtc
Last activity, driving the idle timeout.
public readonly DateTime LastSeenUtc
Field Value
LastStepUpUtc
When the operator last re-proved their authenticator, or null.
public readonly DateTime? LastStepUpUtc
Field Value
Revoked
Whether the session has been revoked.
public readonly bool Revoked
Field Value
TwoFactorSatisfied
Whether two-factor has been satisfied on this session.
public readonly bool TwoFactorSatisfied
Field Value
UserAgent
Truncated user agent the session was issued to.
public readonly string UserAgent