#### [Abblix\.Oidc\.Server\.MinimalApi](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi 'index')
### [Abblix\.Oidc\.Server\.MinimalApi\.Formatters](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters')

## UserInfoResponseFormatter Class

Formats UserInfo results as [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult'): the plain claims JSON, or, when the client registered a
`userinfo_signed_response_alg`, a signed \(and optionally encrypted\) JWT carrying the same claims \(OpenID
Connect Core 5\.3\.2\)\. On failure it returns the RFC 6750 / RFC 9449 §7\.1 challenge response that advertises both the
DPoP and Bearer schemes\.

```csharp
public class UserInfoResponseFormatter : Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IUserInfoResponseFormatter
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → UserInfoResponseFormatter

Implements [IUserInfoResponseFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IUserInfoResponseFormatter 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.Interfaces\.IUserInfoResponseFormatter')
### Constructors

## UserInfoResponseFormatter\(TimeProvider, IClientJwtFormatter, IIssuerProvider, IOptionsSnapshot\<OidcOptions\>\) Constructor {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.UserInfoResponseFormatter(System.TimeProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_)}

Formats UserInfo results as [Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult'): the plain claims JSON, or, when the client registered a
`userinfo_signed_response_alg`, a signed \(and optionally encrypted\) JWT carrying the same claims \(OpenID
Connect Core 5\.3\.2\)\. On failure it returns the RFC 6750 / RFC 9449 §7\.1 challenge response that advertises both the
DPoP and Bearer schemes\.

```csharp
public UserInfoResponseFormatter(System.TimeProvider clock, Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter clientJwtFormatter, Abblix.Oidc.Server.Features.Issuer.IIssuerProvider issuerProvider, Microsoft.Extensions.Options.IOptionsSnapshot<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);
```
#### Parameters

###### `clock` [System\.TimeProvider](https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider 'System\.TimeProvider') {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.UserInfoResponseFormatter(System.TimeProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).clock}

###### `clientJwtFormatter` [IClientJwtFormatter](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter 'Abblix\.Oidc\.Server\.Features\.Tokens\.Formatters\.IClientJwtFormatter') {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.UserInfoResponseFormatter(System.TimeProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).clientJwtFormatter}

###### `issuerProvider` [IIssuerProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Issuer.IIssuerProvider 'Abblix\.Oidc\.Server\.Features\.Issuer\.IIssuerProvider') {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.UserInfoResponseFormatter(System.TimeProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).issuerProvider}

###### `options` [Microsoft\.Extensions\.Options\.IOptionsSnapshot&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptionssnapshot-1 'Microsoft\.Extensions\.Options\.IOptionsSnapshot\`1')[OidcOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptionssnapshot-1 'Microsoft\.Extensions\.Options\.IOptionsSnapshot\`1') {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.UserInfoResponseFormatter(System.TimeProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}
### Methods

## UserInfoResponseFormatter\.FormatResponseAsync\(UserInfoRequest, Result\<UserInfoFoundResponse,OidcError\>\) Method {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.UserInfoRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse,Abblix.Oidc.Server.Common.OidcError_)}

Formats the UserInfo result \(plain JSON, or a signed JWT when the client registered a
            `userinfo_signed_response_alg`, on success; the OAuth error otherwise\)\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IResult> FormatResponseAsync(Abblix.Oidc.Server.Model.UserInfoRequest request, Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse,Abblix.Oidc.Server.Common.OidcError> response);
```
#### Parameters

###### `request` [UserInfoRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.UserInfoRequest 'Abblix\.Oidc\.Server\.Model\.UserInfoRequest') {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.UserInfoRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse,Abblix.Oidc.Server.Common.OidcError_).request}

###### `response` [Abblix\.Utils\.Result&lt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[UserInfoFoundResponse](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse 'Abblix\.Oidc\.Server\.Endpoints\.UserInfo\.Interfaces\.UserInfoFoundResponse')[,](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError')[&gt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2') {#Abblix.Oidc.Server.MinimalApi.Formatters.UserInfoResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.UserInfoRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse,Abblix.Oidc.Server.Common.OidcError_).response}

Implements [FormatResponseAsync\(UserInfoRequest, Result&lt;UserInfoFoundResponse,OidcError&gt;\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-minimalapi/Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IUserInfoResponseFormatter#Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IUserInfoResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.UserInfoRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.UserInfo.Interfaces.UserInfoFoundResponse,Abblix.Oidc.Server.Common.OidcError_) 'Abblix\.Oidc\.Server\.MinimalApi\.Formatters\.Interfaces\.IUserInfoResponseFormatter\.FormatResponseAsync\(Abblix\.Oidc\.Server\.Model\.UserInfoRequest, Abblix\.Utils\.Result\<Abblix\.Oidc\.Server\.Endpoints\.UserInfo\.Interfaces\.UserInfoFoundResponse,Abblix\.Oidc\.Server\.Common\.OidcError\>\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[Microsoft\.AspNetCore\.Http\.IResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.iresult 'Microsoft\.AspNetCore\.Http\.IResult')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')
