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
httpClientHttpClientThe 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
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
urlstringclientNotificationTokenstringauthenticationRequestIdstringcancellationTokenCancellationToken
Returns
Exceptions
- ArgumentException
url,clientNotificationTokenorauthenticationRequestIdis 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
urlstringclientNotificationTokenstringpayloadIReadOnlyDictionary<string, object>cancellationTokenCancellationToken
Returns
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
payloadis null.- ArgumentException
urlorclientNotificationTokenis null or empty.- HttpRequestException
The client's endpoint answered with a status that is not a success.