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
protected readonly
Microsoft.​AspNetCore.​Http.​IHttpContextAccessor
HttpContextAccessor
The HTTP context accessor
protected readonly
Microsoft.​AspNetCore.​Authentication.​IAuthenticationHandlerProvider
Handlers
The handlers
protected readonly
Configuration.​IdentityServerOptions
Options
The options
protected readonly
IClock
Clock
The clock
protected readonly
IServerUrls
Urls
The server URL service.
protected readonly
Microsoft.​Extensions.​Logging.​ILogger
Logger
The logger
Principal
The principal
Properties
The properties
Properties
HttpContext
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.
public
System.​Threading.​Tasks.​Task<​string>
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.
public
System.​Threading.​Tasks.​Task<​System.​Security.​Claims.​ClaimsPrincipal>
GetUserAsync​()
Gets the current authenticated user.
public
System.​Threading.​Tasks.​Task<​string>
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.
public
System.​Threading.​Tasks.​Task<​System.​Collections.​Generic.​IEnumerable<​string>>
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
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object