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.​ISessionManagementService

Assembly: Duende.IdentityServer

Provides administrative features for querying and terminating server-side sessions. When server-side sessions are enabled, this service can be used to enumerate active sessions and to terminate them — including revoking associated tokens and consents, and triggering back-channel logout notifications to participating clients.

Methods

QuerySessionsAsync​(Stores.​SessionQuery? filter, System.​Threading.​CancellationToken ct)
Queries server-side session data for users, returning paged results based on the optional filter. Use this to build administrative UIs that list active sessions.
Returns A <see cref="T:Duende.IdentityServer.Models.QueryResult`1" /> containing the matching <see cref="T:Duende.IdentityServer.Models.UserSession" /> records and pagination metadata.
filter An optional <see cref="T:Duende.IdentityServer.Stores.SessionQuery" /> to filter results by subject ID, session ID, or other criteria. Pass <c>null</c> to return all sessions.
ct The cancellation token.
RemoveSessionsAsync​(RemoveSessionsContext context, System.​Threading.​CancellationToken ct)
Removes server-side session data for the user(s) identified by the given context, and optionally revokes tokens, revokes consents, and sends back-channel logout notifications to the clients that participated in the session.
context A <see cref="T:Duende.IdentityServer.Services.RemoveSessionsContext" /> specifying the subject ID and/or session ID to target, the client IDs to act on, and flags controlling which actions to perform (remove session, revoke tokens, revoke consents, send back-channel logout).
ct The cancellation token.