Class OidcSessionCookie
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
-
objectOidcSessionCookie
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
responseHttpResponse
Read(HttpRequest)
Reads the session ID from the incoming oidc_session cookie.
public static string? Read(HttpRequest request)
Parameters
requestHttpRequest
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
responseHttpResponsesessionIdstring