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

## IntrospectionResponseFormatter Class

Provides a response formatter for introspection responses, returning either a plain JSON document \(RFC 7662\) or,
when the client registered `introspection_signed_response_alg` and requests it via
`Accept: application/token-introspection+jwt`, a signed/encrypted JWT \(RFC 9701\)\.

```csharp
public class IntrospectionResponseFormatter : Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IIntrospectionResponseFormatter
```

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

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

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

Provides a response formatter for introspection responses, returning either a plain JSON document \(RFC 7662\) or,
when the client registered `introspection_signed_response_alg` and requests it via
`Accept: application/token-introspection+jwt`, a signed/encrypted JWT \(RFC 9701\)\.

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

###### `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.Mvc.Formatters.IntrospectionResponseFormatter.IntrospectionResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,System.TimeProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Microsoft.AspNetCore.Http.IHttpContextAccessor).issuerProvider}

Supplies the issuer identifier for error responses and the JWT `iss` claim\.

###### `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.Mvc.Formatters.IntrospectionResponseFormatter.IntrospectionResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,System.TimeProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Microsoft.AspNetCore.Http.IHttpContextAccessor).clientJwtFormatter}

Signs and optionally encrypts the JWT introspection response\.

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

Supplies the current time for the JWT `iat` claim\.

###### `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.Mvc.Formatters.IntrospectionResponseFormatter.IntrospectionResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,System.TimeProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Microsoft.AspNetCore.Http.IHttpContextAccessor).options}

Supplies the default content\-encryption algorithm for JWT introspection responses\.

###### `httpContextAccessor` [Microsoft\.AspNetCore\.Http\.IHttpContextAccessor](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.ihttpcontextaccessor 'Microsoft\.AspNetCore\.Http\.IHttpContextAccessor') {#Abblix.Oidc.Server.Mvc.Formatters.IntrospectionResponseFormatter.IntrospectionResponseFormatter(Abblix.Oidc.Server.Features.Issuer.IIssuerProvider,Abblix.Oidc.Server.Features.Tokens.Formatters.IClientJwtFormatter,System.TimeProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_,Microsoft.AspNetCore.Http.IHttpContextAccessor).httpContextAccessor}

Provides the current request so the formatter can honor the `Accept`
            header negotiation defined by RFC 9701 §4\.
### Methods

## IntrospectionResponseFormatter\.FormatResponseAsync\(IntrospectionRequest, Result\<IntrospectionSuccess,OidcError\>\) Method {#Abblix.Oidc.Server.Mvc.Formatters.IntrospectionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.IntrospectionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.Introspection.Interfaces.IntrospectionSuccess,Abblix.Oidc.Server.Common.OidcError_)}

Formats an introspection response asynchronously\.

```csharp
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ActionResult> FormatResponseAsync(Abblix.Oidc.Server.Model.IntrospectionRequest request, Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Introspection.Interfaces.IntrospectionSuccess,Abblix.Oidc.Server.Common.OidcError> response);
```
#### Parameters

###### `request` [IntrospectionRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.IntrospectionRequest 'Abblix\.Oidc\.Server\.Model\.IntrospectionRequest') {#Abblix.Oidc.Server.Mvc.Formatters.IntrospectionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.IntrospectionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.Introspection.Interfaces.IntrospectionSuccess,Abblix.Oidc.Server.Common.OidcError_).request}

The introspection request\.

###### `response` [Abblix\.Utils\.Result&lt;](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Result_TSuccess_TFailure_ 'Abblix\.Utils\.Result\`2')[IntrospectionSuccess](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Introspection.Interfaces.IntrospectionSuccess 'Abblix\.Oidc\.Server\.Endpoints\.Introspection\.Interfaces\.IntrospectionSuccess')[,](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.Mvc.Formatters.IntrospectionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.IntrospectionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.Introspection.Interfaces.IntrospectionSuccess,Abblix.Oidc.Server.Common.OidcError_).response}

The introspection response model\.

Implements [FormatResponseAsync\(IntrospectionRequest, Result&lt;IntrospectionSuccess,OidcError&gt;\)](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IIntrospectionResponseFormatter#Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IIntrospectionResponseFormatter.FormatResponseAsync(Abblix.Oidc.Server.Model.IntrospectionRequest,Abblix.Utils.Result_Abblix.Oidc.Server.Endpoints.Introspection.Interfaces.IntrospectionSuccess,Abblix.Oidc.Server.Common.OidcError_) 'Abblix\.Oidc\.Server\.Mvc\.Formatters\.Interfaces\.IIntrospectionResponseFormatter\.FormatResponseAsync\(Abblix\.Oidc\.Server\.Model\.IntrospectionRequest, Abblix\.Utils\.Result\<Abblix\.Oidc\.Server\.Endpoints\.Introspection\.Interfaces\.IntrospectionSuccess,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\.Mvc\.ActionResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult 'Microsoft\.AspNetCore\.Mvc\.ActionResult')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A [System\.Threading\.Tasks\.Task](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task 'System\.Threading\.Tasks\.Task') representing the asynchronous operation, with the formatted response as an [Microsoft\.AspNetCore\.Mvc\.ActionResult](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.actionresult 'Microsoft\.AspNetCore\.Mvc\.ActionResult')\.
