Table of Contents

Interface ILogoutContextFactory

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Captures the current session as a logout id, attributed to a client the protocol has verified.

public interface ILogoutContextFactory

Remarks

Deliberately separate from IIdentityServerInteractionService. That interface is a fixed compatibility surface, and a host stubs it in its tests — an extra member there is not additive, it is a compile error in every stub written against its twelve. This one is ours, and only the end-session and SAML single-logout endpoints use it: they have already validated the client and its post-signout redirect URI, which is the whole reason they can attribute a logout that the interactive surface cannot.

DefaultIdentityServerInteractionService implements both, so nothing extra is constructed.

Methods

CreateLogoutContextAsync(string?, string?, IReadOnlyDictionary<string, string>?, CancellationToken)

Captures the current session as a logout id, or null when nobody is signed in.

Task<string?> CreateLogoutContextAsync(string? clientId, string? postLogoutRedirectUri = null, IReadOnlyDictionary<string, string>? parameters = null, CancellationToken cancellationToken = default)

Parameters

clientId string

The client that initiated the signout, when it has been verified.

postLogoutRedirectUri string

The validated post-signout redirect URI, when there is one.

parameters IReadOnlyDictionary<string, string>

The end_session request's parameters, when it started the sign-out; handed to the logout page as Parameters, less those this server acted on. New in 0.129.0.

cancellationToken CancellationToken

Cancels the capture.

Returns

Task<string>