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.​IIdentityServerInteractionService
Assembly: Duende.IdentityServer
Provide services be used by the user interface to communicate with IdentityServer.
Methods
System.​Threading.​Tasks.​Task<​Models.​AuthorizationRequest>
GetAuthorizationContextAsync​(string returnUrl,
System.​Threading.​CancellationToken ct)
Gets the authorization context.
returnUrl
The return URL.
ct
The cancellation token.
bool
IsValidReturnUrl​(string returnUrl)
Indicates if the returnUrl is a valid URL for redirect after login or consent.
returnUrl
The return URL.
System.​Threading.​Tasks.​Task<​Models.​ErrorMessage>
GetErrorContextAsync​(string errorId,
System.​Threading.​CancellationToken ct)
Gets the error context.
errorId
The error identifier.
ct
The cancellation token.
System.​Threading.​Tasks.​Task<​Models.​LogoutRequest>
GetLogoutContextAsync​(string logoutId,
System.​Threading.​CancellationToken ct)
Gets the logout context.
logoutId
The logout identifier.
ct
The cancellation token.
System.​Threading.​Tasks.​Task<​string>
CreateLogoutContextAsync​(System.​Threading.​CancellationToken ct)
Used to create a logoutId if there is not one presently.
ct
The cancellation token.
GrantConsentAsync​(Models.​AuthorizationRequest request,
Models.​ConsentResponse consent,
System.​Threading.​CancellationToken ct,
string subject = null)
Informs IdentityServer of the user's consent.
request
The request.
consent
The consent.
ct
The cancellation token.
subject
The subject.
DenyAuthorizationAsync​(Models.​AuthorizationRequest request,
Models.​AuthorizationError error,
System.​Threading.​CancellationToken ct,
string errorDescription = null)
Triggers error back to the client for the authorization request.
This API is a simpler helper on top of GrantConsentAsync.
request
The request.
ct
The cancellation token.
System.​Threading.​Tasks.​Task<​System.​Collections.​Generic.​IEnumerable<​Models.​Grant>>
GetAllUserGrantsAsync​(System.​Threading.​CancellationToken ct)
Returns a collection representing all of the user's consents and grants.
ct
The cancellation token.
RevokeUserConsentAsync​(string clientId,
System.​Threading.​CancellationToken ct)
Revokes all a user's consents and grants for a given client, or for all clients if clientId is null.
clientId
The client identifier.
ct
The cancellation token.
RevokeTokensForCurrentSessionAsync​(System.​Threading.​CancellationToken ct)
Revokes all of a user's consents and grants for clients the user has signed into during their current session.
ct
The cancellation token.