Table of Contents

Class DefaultBackChannelAuthenticationNotificationHttpClient

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

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public sealed class DefaultBackChannelAuthenticationNotificationHttpClient : IBackChannelAuthenticationNotificationHttpClient
Inheritance
DefaultBackChannelAuthenticationNotificationHttpClient
Implements
Inherited Members

Constructors

DefaultBackChannelAuthenticationNotificationHttpClient(HttpClient)

Creates the client over the named HttpClient (HttpClientName).

public DefaultBackChannelAuthenticationNotificationHttpClient(HttpClient httpClient)

Parameters

httpClient HttpClient

The HTTP client the callbacks are sent with.

Fields

HttpClientName

The named client, so a host can configure the handler without replacing this service.

public const string HttpClientName = "Fdyay.IdentityServer.BackChannelAuthenticationNotification"

Field Value

string

Methods

PostNotificationAsync(string, string, string, CancellationToken)

POSTs {"auth_req_id": …} to url, bearing the client's own token.

public Task PostNotificationAsync(string url, string clientNotificationToken, string authenticationRequestId, CancellationToken cancellationToken = default)

Parameters

url string
clientNotificationToken string
authenticationRequestId string
cancellationToken CancellationToken

Returns

Task

Exceptions

ArgumentException

url, clientNotificationToken or authenticationRequestId is null or empty.

HttpRequestException

The client's endpoint answered with a status that is not a success.

PostTokensAsync(string, string, IReadOnlyDictionary<string, object>, CancellationToken)

POSTs a push-mode result — the tokens, or the error — to url as JSON.

public Task PostTokensAsync(string url, string clientNotificationToken, IReadOnlyDictionary<string, object> payload, CancellationToken cancellationToken = default)

Parameters

url string
clientNotificationToken string
payload IReadOnlyDictionary<string, object>
cancellationToken CancellationToken

Returns

Task

Remarks

The payload is built by the caller and already carries auth_req_id (CIBA Core §10.3): this member decides how it travels, not what it says, so a host replacing the client cannot change which tokens a client receives.

Exceptions

ArgumentNullException

payload is null.

ArgumentException

url or clientNotificationToken is null or empty.

HttpRequestException

The client's endpoint answered with a status that is not a success.