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.​IPersistedGrantService
Assembly: Duende.IdentityServer
Provides access to a user's persisted grants, which represent consents and authorizations that have been granted to client applications. Use this service to retrieve or revoke grants on behalf of a user, for example when building a grants management page.
Methods
System.​Threading.​Tasks.​Task<​System.​Collections.​Generic.​IReadOnlyCollection<​Models.​Grant>>
GetAllGrantsAsync​(string subjectId,
System.​Threading.​CancellationToken ct)
Gets all grants for the specified subject ID.
Each <see cref="T:Duende.IdentityServer.Models.Grant" /> represents a consent or authorization the user has given to a client,
including the client identifier, granted scopes, creation time, and expiration.
Returns A read-only collection of <see cref="T:Duende.IdentityServer.Models.Grant" /> objects representing all active grants
for the specified user.
subjectId
The subject identifier (user ID) whose grants should be retrieved.
ct
The cancellation token.
RemoveAllGrantsAsync​(string subjectId,
System.​Threading.​CancellationToken ct,
string clientId = null,
string sessionId = null)
Removes all grants for the specified subject ID, optionally scoped to a particular
client and/or session. When <paramref name="clientId" /> and <paramref name="sessionId" />
are both omitted, all grants for the user are removed.
subjectId
The subject identifier (user ID) whose grants should be removed.
ct
The cancellation token.
clientId
The client identifier to restrict removal to a specific client, or <c>null</c> to remove
grants for all clients.
sessionId
The session identifier to restrict removal to a specific session, or <c>null</c> to remove
grants across all sessions.