Skip to content

BackChannelAuthenticationResponseFormatter Class

Formats CIBA backchannel authentication results as Microsoft.AspNetCore.Http.IResult: a JSON success response, a 401 with a WWW-Authenticate challenge matching the client's scheme, a 403, or a 400 with the JSON error envelope.

C#
public class BackChannelAuthenticationResponseFormatter : Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IBackChannelAuthenticationResponseFormatter

Inheritance System.Object → BackChannelAuthenticationResponseFormatter

Implements IBackChannelAuthenticationResponseFormatter

Constructors

BackChannelAuthenticationResponseFormatter(IIssuerProvider) Constructor

Formats CIBA backchannel authentication results as Microsoft.AspNetCore.Http.IResult: a JSON success response, a 401 with a WWW-Authenticate challenge matching the client's scheme, a 403, or a 400 with the JSON error envelope.

C#
public BackChannelAuthenticationResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider issuerProvider);

Parameters

issuerProvider IIssuerProvider

Supplies the issuer used as the realm on client-authentication challenges.

Methods

BackChannelAuthenticationResponseFormatter.FormatResponseAsync(BackChannelAuthenticationRequest, ClientRequest, Result<BackChannelAuthenticationSuccess,OidcError>) Method

Formats the backchannel authentication result: a JSON success response, or the RFC-compliant OAuth error (401 with a WWW-Authenticate challenge, 403, or 400 depending on the failure).

C#
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult> FormatResponseAsync(Abblix.Oidc.Server.Model.BackChannelAuthenticationRequest request, Abblix.Oidc.Server.Model.ClientRequest clientRequest, Abblix.Utils.Result<Abblix.Oidc.Server.Model.BackChannelAuthenticationSuccess,Abblix.Oidc.Server.Common.OidcError> response);

Parameters

request BackChannelAuthenticationRequest

The original backchannel authentication request that triggered the response.

clientRequest ClientRequest

The client request, used to match the WWW-Authenticate scheme on a 401 per RFC 6749 §5.2.

response Abblix.Utils.Result<BackChannelAuthenticationSuccess,OidcError>

The backchannel authentication result to format.

Implements FormatResponseAsync(BackChannelAuthenticationRequest, ClientRequest, Result<BackChannelAuthenticationSuccess,OidcError>)

Returns

System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult>