Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Duende.​IdentityServer.​Services.​DefaultUserSession

Assembly: Duende.IdentityServer

Inheritance: object → DefaultUserSession

Implemented Interfaces

Cookie-based session implementation

Fields and Constants

HttpContextAccessor
The HTTP context accessor
Options
The options
protected readonly IClock
Clock
The clock
protected readonly IServerUrls
Urls
The server URL service.
The logger
The principal

Properties

Gets the HTTP context.
protected string
CheckSessionCookieName
Gets the name of the check session cookie.
protected string
CheckSessionCookieDomain
Gets the domain of the check session cookie.
CheckSessionCookieSameSiteMode
Gets the SameSite mode of the check session cookie.

Methods

AuthenticateAsync​()
Authenticates the authentication cookie for the current HTTP request and caches the user and properties results.
CreateSessionIdAsync​(System.​Security.​Claims.​ClaimsPrincipal principal, Microsoft.​AspNetCore.​Authentication.​AuthenticationProperties properties)
Creates a session identifier for the signin context and issues the session id cookie.
GetUserAsync​()
Gets the current authenticated user.
GetSessionIdAsync​()
Gets the current session identifier.
EnsureSessionIdCookieAsync​()
Ensures the session identifier cookie is synchronized with the current session identifier. If there is no sid, the cookie is removed. If there is a sid, and the session identifier cookie is missing, it is issued.
RemoveSessionIdCookieAsync​()
Removes the session identifier cookie.
CreateSessionIdCookieOptions​()
Creates the options for the session cookie.
public void
IssueSessionIdCookie​(string sid)
Issues the cookie that contains the session id.
AddClientIdAsync​(string clientId)
Adds a client to the list of clients the user has signed into during their session.
clientId The client identifier.
GetClientListAsync​()
Gets the list of clients the user has signed into during their session.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object