Skip to content

ContextCookie

Payload serialized into the short-lived BolContext cookie. It carries the resolved context, the user type and state, and per-user settings between requests so the page models need not repeat lookups.

Purpose

Context

  • Namespace: BolMiddleware.Models
  • Assembly/package: BolMiddleware

Public members

Member Signature Purpose
contextResult ContextResult contextResult Context returned from the BOL Context API for the current user.
cookieName string cookieName = "BolContext" Name of the cookie that stores this payload.
userType CurrentUserType userType = Unknown Whether the user is internal or external.
userState CurrentUserState userState = New Whether the external user lookup was completed.
userSettings Dictionary<string,string> userSettings Free-form per-user values managed through IContextCookieHelper.
cookieTracking List<string> cookieTracking Names of cookies the library has set, kept for tracking.

Behavioral notes

  • The cookie is not signed or encrypted, so its content can be altered by the client.

Constraints and usage notes

  • Keep the payload small; it travels on every request.

Sources

  • src/BolMiddleware/Models/ContextCookie.cs