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.
interface Duende.​IdentityServer.​Services.​IUserSession
Assembly: Duende.IdentityServer
Models a user's authentication session
Methods
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.
System.​Threading.​Tasks.​Task<​System.​Security.​Claims.​ClaimsPrincipal>
GetUserAsync​()
Gets the current authenticated user.
System.​Threading.​Tasks.​Task<​string>
GetSessionIdAsync​()
Gets the current session identifier.
EnsureSessionIdCookieAsync​()
Ensures the session identifier cookie asynchronously.
RemoveSessionIdCookieAsync​()
Removes the session identifier cookie.
AddClientIdAsync​(string clientId)
Adds a client to the list of clients the user has signed into during their session.
clientId
The client identifier.
System.​Threading.​Tasks.​Task<​System.​Collections.​Generic.​IEnumerable<​string>>
GetClientListAsync​()
Gets the list of clients the user has signed into during their session.