Skip to content

RegisterClientResponseFormatter Class

Provides a response formatter for client registration responses.

C#
public class RegisterClientResponseFormatter : Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IRegisterClientResponseFormatter

Inheritance System.Object → RegisterClientResponseFormatter

Implements IRegisterClientResponseFormatter

Constructors

RegisterClientResponseFormatter(IUriResolver) Constructor

Provides a response formatter for client registration responses.

C#
public RegisterClientResponseFormatter(Abblix.Oidc.Server.Mvc.IUriResolver uriResolver);

Parameters

uriResolver IUriResolver

The action URI provider used for generating URIs for client management actions.

Methods

RegisterClientResponseFormatter.FormatResponseAsync(ClientRegistrationRequest, Result<ClientRegistrationSuccessResponse,OidcError>) Method

Formats a client registration response asynchronously, converting the response model to an appropriate Microsoft.AspNetCore.Mvc.ActionResult based on the nature of the response.

C#
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> FormatResponseAsync(Abblix.Oidc.Server.Model.ClientRegistrationRequest request, Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.ClientRegistrationSuccessResponse,Abblix.Oidc.Server.Common.OidcError> response);

Parameters

request ClientRegistrationRequest

The client registration request containing the data submitted by the client.

response Abblix.Utils.Result<ClientRegistrationSuccessResponse,OidcError>

The client registration response model to be formatted.

Implements FormatResponseAsync(ClientRegistrationRequest, Result<ClientRegistrationSuccessResponse,OidcError>)

Returns

System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult>
A System.Threading.Tasks.Task representing the asynchronous operation, with the formatted response as an Microsoft.AspNetCore.Mvc.ActionResult. Depending on the response, this may be a success result with client details or an error response.

Remarks

This method handles different types of responses: successful registration and error scenarios. In the case of successful registration, it returns a 201 Created response with client details. In the case of an error, it returns a 400 Bad Request response with error details.