Skip to content

UserInfoResponseFormatter Class

Formats UserInfo results as 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.

C#
public class UserInfoResponseFormatter : Abblix.Oidc.Server.MinimalApi.Formatters.Interfaces.IUserInfoResponseFormatter

Inheritance System.Object → UserInfoResponseFormatter

Implements IUserInfoResponseFormatter

Constructors

UserInfoResponseFormatter(TimeProvider, IClientJwtFormatter, IIssuerProvider, IOptionsSnapshot<OidcOptions>) Constructor

Formats UserInfo results as 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.

C#
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
clientJwtFormatter IClientJwtFormatter
issuerProvider IIssuerProvider
options Microsoft.Extensions.Options.IOptionsSnapshot<OidcOptions>

Methods

UserInfoResponseFormatter.FormatResponseAsync(UserInfoRequest, Result<UserInfoFoundResponse,OidcError>) Method

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).

C#
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
response Abblix.Utils.Result<UserInfoFoundResponse,OidcError>

Implements FormatResponseAsync(UserInfoRequest, Result<UserInfoFoundResponse,OidcError>)

Returns

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