Table of Contents

Class OidcSessionCookie

Namespace
SEBT.Portal.Api.Services
Assembly
SEBT.Portal.Api.dll

helper for the oidc_session HttpOnly cookie that binds the pre-auth OIDC session to the browser. Short-lived (15 min, matching PreAuthSessionStore TTL). Cleared after complete-login because the session has served its purpose by then.

public static class OidcSessionCookie
Inheritance
object
OidcSessionCookie

Fields

CookieName

Name of the pre-auth session cookie.

public const string CookieName = "oidc_session"

Field Value

string

Methods

Clear(HttpResponse)

Clears the oidc_session cookie after login completes.

public static void Clear(HttpResponse response)

Parameters

response HttpResponse

Read(HttpRequest)

Reads the session ID from the incoming oidc_session cookie.

public static string? Read(HttpRequest request)

Parameters

request HttpRequest

Returns

string

Set(HttpResponse, string)

Writes the pre-auth session ID to the oidc_session cookie.

public static void Set(HttpResponse response, string sessionId)

Parameters

response HttpResponse
sessionId string