Table of Contents

Class DefaultBackChannelLogoutService

Namespace
Duende.IdentityServer.Services
Assembly
Duende.IdentityServer.dll

Default back-channel logout notification implementation.

public class DefaultBackChannelLogoutService : IBackChannelLogoutService
Inheritance
DefaultBackChannelLogoutService
Implements
Inherited Members

Constructors

DefaultBackChannelLogoutService(IClock, IIdentityServerTools, ILogoutNotificationService, IBackChannelLogoutHttpClient, IIssuerNameService, ILogger<IBackChannelLogoutService>)

Constructor.

public DefaultBackChannelLogoutService(IClock clock, IIdentityServerTools tools, ILogoutNotificationService logoutNotificationService, IBackChannelLogoutHttpClient backChannelLogoutHttpClient, IIssuerNameService issuerNameService, ILogger<IBackChannelLogoutService> logger)

Parameters

clock IClock
tools IIdentityServerTools
logoutNotificationService ILogoutNotificationService
backChannelLogoutHttpClient IBackChannelLogoutHttpClient
issuerNameService IIssuerNameService
logger ILogger<IBackChannelLogoutService>

Fields

DefaultLogoutTokenLifetime

Default value for the back-channel JWT lifetime.

protected const int DefaultLogoutTokenLifetime = 300

Field Value

int

Properties

Clock

The system clock;

protected IClock Clock { get; }

Property Value

IClock

HttpClient

HttpClient to make the outbound HTTP calls.

protected IBackChannelLogoutHttpClient HttpClient { get; }

Property Value

IBackChannelLogoutHttpClient

IssuerNameService

Ths issuer name service.

protected IIssuerNameService IssuerNameService { get; }

Property Value

IIssuerNameService

Logger

The logger.

protected ILogger<IBackChannelLogoutService> Logger { get; }

Property Value

ILogger<IBackChannelLogoutService>

LogoutNotificationService

The ILogoutNotificationService to build the back channel logout requests.

public ILogoutNotificationService LogoutNotificationService { get; }

Property Value

ILogoutNotificationService

Tools

The IdentityServerTools used to create the JWT.

protected IIdentityServerTools Tools { get; }

Property Value

IIdentityServerTools

Methods

CreateClaimsForTokenAsync(BackChannelLogoutRequest)

Create the claims to be used in the back-channel logout token.

protected Task<IEnumerable<Claim>> CreateClaimsForTokenAsync(BackChannelLogoutRequest request)

Parameters

request BackChannelLogoutRequest

Returns

Task<IEnumerable<Claim>>

The claims to include in the token.

CreateFormPostPayloadAsync(BackChannelLogoutRequest)

Creates the form-url-encoded payload (as a dictionary) to send to the client.

protected Task<Dictionary<string, string>> CreateFormPostPayloadAsync(BackChannelLogoutRequest request)

Parameters

request BackChannelLogoutRequest

Returns

Task<Dictionary<string, string>>

CreateTokenAsync(BackChannelLogoutRequest)

Creates the JWT used for the back-channel logout notification.

protected virtual Task<string> CreateTokenAsync(BackChannelLogoutRequest request)

Parameters

request BackChannelLogoutRequest

Returns

Task<string>

The token.

PostLogoutJwt(BackChannelLogoutRequest, Dictionary<string, string>)

Performs the HTTP POST of the logout payload to the client.

protected virtual Task PostLogoutJwt(BackChannelLogoutRequest client, Dictionary<string, string> data)

Parameters

client BackChannelLogoutRequest
data Dictionary<string, string>

Returns

Task

SendLogoutNotificationAsync(BackChannelLogoutRequest)

Performs the back-channel logout for a single client.

protected virtual Task SendLogoutNotificationAsync(BackChannelLogoutRequest request)

Parameters

request BackChannelLogoutRequest

Returns

Task

SendLogoutNotificationsAsync(LogoutNotificationContext)

public virtual Task SendLogoutNotificationsAsync(LogoutNotificationContext context)

Parameters

context LogoutNotificationContext

Returns

Task

SendLogoutNotificationsAsync(IEnumerable<BackChannelLogoutRequest>)

Sends the logout notifications for the collection of clients.

protected virtual Task SendLogoutNotificationsAsync(IEnumerable<BackChannelLogoutRequest> requests)

Parameters

requests IEnumerable<BackChannelLogoutRequest>

Returns

Task