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).
public class IntrospectionResponseFormatter : Abblix.Oidc.Server.Mvc.Formatters.Interfaces.IIntrospectionResponseFormatterInheritance System.Object → IntrospectionResponseFormatter
Implements IIntrospectionResponseFormatter
Constructors
IntrospectionResponseFormatter(IIssuerProvider, IClientJwtFormatter, TimeProvider, IOptionsSnapshot<OidcOptions>, IHttpContextAccessor) Constructor
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).
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
Supplies the issuer identifier for error responses and the JWT iss claim.
clientJwtFormatter IClientJwtFormatter
Signs and optionally encrypts the JWT introspection response.
clock System.TimeProvider
Supplies the current time for the JWT iat claim.
options Microsoft.Extensions.Options.IOptionsSnapshot<OidcOptions>
Supplies the default content-encryption algorithm for JWT introspection responses.
httpContextAccessor Microsoft.AspNetCore.Http.IHttpContextAccessor
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
Formats an introspection response asynchronously.
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
The introspection request.
response Abblix.Utils.Result<IntrospectionSuccess,OidcError>
The introspection response model.
Implements FormatResponseAsync(IntrospectionRequest, Result<IntrospectionSuccess,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.