RequestObjectFetcher Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.RequestObject
RequestObjectFetcher Class
Provides functionality to validate and process JWT request objects, binding their payloads to a request model. This class is typically used in OpenID Connect flows where request parameters are passed as JWTs.
public class RequestObjectFetcher : Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher
Inheritance System.Object → RequestObjectFetcher
Implements IRequestObjectFetcher
Constructors
RequestObjectFetcher(ILogger<RequestObjectFetcher>, IJsonObjectBinder, IServiceProvider, IOptionsSnapshot<OidcOptions>) Constructor
Provides functionality to validate and process JWT request objects, binding their payloads to a request model. This class is typically used in OpenID Connect flows where request parameters are passed as JWTs.
public RequestObjectFetcher(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher> logger, Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder jsonObjectBinder, System.IServiceProvider serviceProvider, Microsoft.Extensions.Options.IOptionsSnapshot<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);
Parameters
logger Microsoft.Extensions.Logging.ILogger<RequestObjectFetcher>
The logger for recording debug information and warnings.
jsonObjectBinder IJsonObjectBinder
The binder for converting JSON payloads into request objects.
serviceProvider System.IServiceProvider
The service provider used for resolving dependencies at runtime.
options Microsoft.Extensions.Options.IOptionsSnapshot<OidcOptions>
Options that define how request object validation is handled, including whether request objects must be signed.
Methods
RequestObjectFetcher.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.
public 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>
An optional selector returning the signing algorithm the
request object must use for a given client, or null to impose no per-client requirement.
Implements FetchAsync<T>(T, string, Func<ClientInfo,string>)
Returns
System.Threading.Tasks.Task<Abblix.Utils.Result<T,OidcError>>
A task representing the asynchronous operation. The task result contains an Abblix.Utils.Result<>
which either represents a successfully processed request or an error indicating issues with the JWT validation.
Remarks
This method is used to decode and validate the JWT contained in the request. If the JWT is valid, the payload is bound to the request model. If the JWT is invalid, an error is returned and logged.