Table of Contents

Class BackchannelAuthenticationResponseGenerator

Namespace
Fdyay.IdentityServer.ResponseHandling
Assembly
Fdyay.IdentityServer.Core.dll

Duende's default backchannel authentication response generator.

public class BackchannelAuthenticationResponseGenerator : IBackchannelAuthenticationResponseGenerator
Inheritance
BackchannelAuthenticationResponseGenerator
Implements
Inherited Members

Constructors

BackchannelAuthenticationResponseGenerator(IOptions<IdentityServerOptions>, IBackChannelAuthenticationRequestStore, IBackchannelAuthenticationUserNotificationService, IHandleGenerationService, TimeProvider, ILogger<BackchannelAuthenticationResponseGenerator>)

Creates the generator.

public BackchannelAuthenticationResponseGenerator(IOptions<IdentityServerOptions> options, IBackChannelAuthenticationRequestStore requests, IBackchannelAuthenticationUserNotificationService notifications, IHandleGenerationService handles, TimeProvider timeProvider, ILogger<BackchannelAuthenticationResponseGenerator> logger)

Parameters

options IOptions<IdentityServerOptions>

The server's options, for the CIBA polling interval.

requests IBackChannelAuthenticationRequestStore

Where backchannel requests are kept.

notifications IBackchannelAuthenticationUserNotificationService

Reaches the user the request names.

handles IHandleGenerationService

Generates the auth_req_id and the request's internal id.

timeProvider TimeProvider

The clock the request's creation time is read from.

logger ILogger<BackchannelAuthenticationResponseGenerator>

Where a failed notification is logged.

Exceptions

ArgumentNullException

options is null.

Properties

Handles

Generates the auth_req_id and the internal id, which Duende's store generates inside itself.

protected IHandleGenerationService Handles { get; }

Property Value

IHandleGenerationService

Logger

Where a failed notification is logged.

protected ILogger Logger { get; }

Property Value

ILogger

Notifications

Reaches the user. Duende's UserLoginService.

protected IBackchannelAuthenticationUserNotificationService Notifications { get; }

Property Value

IBackchannelAuthenticationUserNotificationService

Options

The server's options; Ciba.Interval is the polling interval a client is told.

protected IdentityServerOptions Options { get; }

Property Value

IdentityServerOptions

Requests

Where backchannel requests are kept. Duende's BackChannelAuthenticationRequestStore.

protected IBackChannelAuthenticationRequestStore Requests { get; }

Property Value

IBackChannelAuthenticationRequestStore

TimeProvider

The clock a stored request's creation time is read from.

protected TimeProvider TimeProvider { get; }

Property Value

TimeProvider

Methods

ProcessAsync(BackchannelAuthenticationRequestValidationResult, CancellationToken)

Stores the validated request, notifies the user, and builds the response for the client.

public virtual Task<BackchannelAuthenticationResponse> ProcessAsync(BackchannelAuthenticationRequestValidationResult validationResult, CancellationToken ct)

Parameters

validationResult BackchannelAuthenticationRequestValidationResult

The successfully validated backchannel authentication request.

ct CancellationToken

Cancels the storage and the notification.

Returns

Task<BackchannelAuthenticationResponse>

The auth_req_id, its lifetime and the polling interval; or an error when the request cannot be answered.

Remarks

A notification that fails removes the stored request and answers server_error, so the client is never handed an auth_req_id nobody was told about.

Exceptions

ArgumentNullException

validationResult is null.

ArgumentException

The validated request names no client.