Skip to main content

IRequestObjectFetcher Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.RequestObject

IRequestObjectFetcher Interface

Defines the interface for fetching and processing JWT request objects, validating their content and binding their payloads to a request model. This is typically used in OpenID Connect flows where request parameters are passed as JWTs.

public interface IRequestObjectFetcher

Derived
RequestObjectFetcher

Methods

IRequestObjectFetcher.FetchAsync<T>(T, string, Func<ClientInfo,string>) Method

Fetches and processes the request object by validating its JWT and binding the payload to the request model.

System.Threading.Tasks.Task<Abblix.Utils.Result<T,Abblix.Oidc.Server.Common.OidcError>> FetchAsync<T>(T request, string? requestObject, System.Func<Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string?>? requiredSigningAlgorithm=null)
where T : class;

Type parameters

T

The type of the request model.

Parameters

request T

The initial request model to bind the JWT payload to.

requestObject System.String

The JWT contained within the request, if any.

requiredSigningAlgorithm System.Func<ClientInfo,System.String>

Optional selector returning the algorithm the resolved client registered for this kind of request object (e.g. request_object_signing_alg for authorization requests or backchannel_authentication_request_signing_alg for CIBA). When it returns a non-empty value, a request object whose alg differs is rejected.

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<T,OidcError>>
A task representing the asynchronous operation. The task result contains a Abblix.Utils.Result<> object, which either represents a successfully processed request or an error indicating issues with the JWT validation.

Remarks

This method is responsible for decoding and validating the JWT contained in the request. If the JWT is valid, the payload is bound to the request model. If the JWT is invalid or not present, an appropriate error result is returned.