Nucleus .Net Core CMS

Models.UserSession Class

Namespace: Nucleus.Abstractions.Models
Assembly: Nucleus.Abstractions.dll
Represent the session for a logged-in user.

Constructors

Nucleus.Abstractions.Models.UserSession Constructor

Nucleus.Abstractions.Models.UserSession ()
Initialize a new instance of UserSession.
Remarks
This constructor is used when reading an existing session.

Nucleus.Abstractions.Models.UserSession Constructor

Nucleus.Abstractions.Models.UserSession (Nucleus.Abstractions.Models.Site,  Nucleus.Abstractions.Models.User,  System.Boolean,  System.Net.IPAddress,  System.DateTime,  System.Boolean)
Initialize a new UserSession for a specified site, user, and IP address.
Remarks
This constructor is used when a user logs in.

Properties

Id Property

Unique record identifier.

UserId Property

User Id of the user who owns the session.

SiteId Property

Site Id of the site that the user is logged into.

SlidingExpiry Property

Gets or sets whether to update the session expiry date when a new request is processed.

IsPersistent Property

Gets or sets whether the browser cookie representing the session should persist between browser sessions.

ExpiryDate Property

Session expiry date/time.

IssuedDate Property

Date/Time that the session was created.

DateAdded Property

Record creation date date/time.

RemoteIpAddress Property

Address of the user-agent used to log in.
Remarks
The remote IP address must match for all subsequent uses of the session.

LastUpdated Property

This value is used to track the most recent database update for the user session.