Interface IIdentityServerInteractionService
- Namespace
- Duende.IdentityServer.Services
- Assembly
- Duende.IdentityServer.dll
Provide services be used by the user interface to communicate with IdentityServer.
public interface IIdentityServerInteractionService
Methods
CreateLogoutContextAsync()
Used to create a logoutId if there is not one presently.
Task<string?> CreateLogoutContextAsync()
Returns
DenyAuthorizationAsync(AuthorizationRequest, AuthorizationError, string?)
Triggers error back to the client for the authorization request. This API is a simpler helper on top of GrantConsentAsync.
Task DenyAuthorizationAsync(AuthorizationRequest request, AuthorizationError error, string? errorDescription = null)
Parameters
request
AuthorizationRequestThe request.
error
AuthorizationErrorerrorDescription
string
Returns
GetAllUserGrantsAsync()
Returns a collection representing all of the user's consents and grants.
Task<IEnumerable<Grant>> GetAllUserGrantsAsync()
Returns
GetAuthorizationContextAsync(string?)
Gets the authorization context.
Task<AuthorizationRequest?> GetAuthorizationContextAsync(string? returnUrl)
Parameters
returnUrl
stringThe return URL.
Returns
GetErrorContextAsync(string?)
Gets the error context.
Task<ErrorMessage?> GetErrorContextAsync(string? errorId)
Parameters
errorId
stringThe error identifier.
Returns
GetLogoutContextAsync(string?)
Gets the logout context.
Task<LogoutRequest> GetLogoutContextAsync(string? logoutId)
Parameters
logoutId
stringThe logout identifier.
Returns
GrantConsentAsync(AuthorizationRequest, ConsentResponse, string?)
Informs IdentityServer of the user's consent.
Task GrantConsentAsync(AuthorizationRequest request, ConsentResponse consent, string? subject = null)
Parameters
request
AuthorizationRequestThe request.
consent
ConsentResponseThe consent.
subject
stringThe subject.
Returns
IsValidReturnUrl(string?)
Indicates if the returnUrl is a valid URL for redirect after login or consent.
bool IsValidReturnUrl(string? returnUrl)
Parameters
returnUrl
stringThe return URL.
Returns
RevokeTokensForCurrentSessionAsync()
Revokes all of a user's consents and grants for clients the user has signed into during their current session.
Task RevokeTokensForCurrentSessionAsync()
Returns
RevokeUserConsentAsync(string?)
Revokes all a user's consents and grants for a given client, or for all clients if clientId is null.
Task RevokeUserConsentAsync(string? clientId)
Parameters
clientId
stringThe client identifier.