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
IClocktools
IIdentityServerToolslogoutNotificationService
ILogoutNotificationServicebackChannelLogoutHttpClient
IBackChannelLogoutHttpClientissuerNameService
IIssuerNameServicelogger
ILogger<IBackChannelLogoutService>
Fields
DefaultLogoutTokenLifetime
Default value for the back-channel JWT lifetime.
protected const int DefaultLogoutTokenLifetime = 300
Field Value
Properties
Clock
The system clock;
protected IClock Clock { get; }
Property Value
HttpClient
HttpClient to make the outbound HTTP calls.
protected IBackChannelLogoutHttpClient HttpClient { get; }
Property Value
IssuerNameService
Ths issuer name service.
protected IIssuerNameService IssuerNameService { get; }
Property Value
Logger
The logger.
protected ILogger<IBackChannelLogoutService> Logger { get; }
Property Value
LogoutNotificationService
The ILogoutNotificationService to build the back channel logout requests.
public ILogoutNotificationService LogoutNotificationService { get; }
Property Value
Tools
The IdentityServerTools used to create the JWT.
protected IIdentityServerTools Tools { get; }
Property Value
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
CreateTokenAsync(BackChannelLogoutRequest)
Creates the JWT used for the back-channel logout notification.
protected virtual Task<string> CreateTokenAsync(BackChannelLogoutRequest request)
Parameters
request
BackChannelLogoutRequest
Returns
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
BackChannelLogoutRequestdata
Dictionary<string, string>
Returns
SendLogoutNotificationAsync(BackChannelLogoutRequest)
Performs the back-channel logout for a single client.
protected virtual Task SendLogoutNotificationAsync(BackChannelLogoutRequest request)
Parameters
request
BackChannelLogoutRequest
Returns
SendLogoutNotificationsAsync(LogoutNotificationContext)
public virtual Task SendLogoutNotificationsAsync(LogoutNotificationContext context)
Parameters
context
LogoutNotificationContext
Returns
SendLogoutNotificationsAsync(IEnumerable<BackChannelLogoutRequest>)
Sends the logout notifications for the collection of clients.
protected virtual Task SendLogoutNotificationsAsync(IEnumerable<BackChannelLogoutRequest> requests)
Parameters
requests
IEnumerable<BackChannelLogoutRequest>