Table of Contents

Class ServerSideSession

Namespace
Fdyay.IdentityServer.Models
Assembly
Fdyay.IdentityServer.Core.dll

A signed-in browser session, held server-side rather than only in the cookie.

public class ServerSideSession
Inheritance
ServerSideSession
Inherited Members

Remarks

The session already exists without this — it lives in the authentication ticket, which is why it can be identified. What it cannot be is found: nothing can list the sessions a subject has, and nothing can end one from outside the browser holding it. Both are administrative operations, and both need the session to exist somewhere the server can query.

Ticket is the protected ticket, so the cookie becomes a reference to this row rather than the session itself. That is what makes ending a session take effect: deleting the row makes the cookie resolve to nothing, where a self-contained cookie stays valid until it expires no matter what the server would prefer.

Properties

Created

When the session began (UTC).

public DateTime Created { get; set; }

Property Value

DateTime

DisplayName

A human-readable name, so an administrative list is readable by one.

public string? DisplayName { get; set; }

Property Value

string

Expires

When it expires (UTC), or null if it does not expire on its own.

public DateTime? Expires { get; set; }

Property Value

DateTime?

Key

The store key, and the value the cookie carries in place of the ticket.

public string Key { get; set; }

Property Value

string

Renewed

When it was last used (UTC), which sliding expiration moves forward.

public DateTime Renewed { get; set; }

Property Value

DateTime

Scheme

The authentication scheme the session belongs to.

public string Scheme { get; set; }

Property Value

string

SessionId

The sid, where the session has one.

public string? SessionId { get; set; }

Property Value

string

SubjectId

The subject the session is for.

public string SubjectId { get; set; }

Property Value

string

Ticket

The protected authentication ticket.

public string Ticket { get; set; }

Property Value

string