#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.RequestObject](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject '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\.

```csharp
public class RequestObjectFetcher : Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher
```

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

Implements [IRequestObjectFetcher](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher 'Abblix\.Oidc\.Server\.Features\.RequestObject\.IRequestObjectFetcher')
### Constructors

## RequestObjectFetcher\(ILogger\<RequestObjectFetcher\>, IJsonObjectBinder, IServiceProvider, IOptionsSnapshot\<OidcOptions\>\) Constructor {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.RequestObjectFetcher(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher_,Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder,System.IServiceProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_)}

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

```csharp
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&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1')[RequestObjectFetcher](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher 'Abblix\.Oidc\.Server\.Features\.RequestObject\.RequestObjectFetcher')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.RequestObjectFetcher(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher_,Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder,System.IServiceProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).logger}

The logger for recording debug information and warnings\.

###### `jsonObjectBinder` [IJsonObjectBinder](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IJsonObjectBinder') {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.RequestObjectFetcher(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher_,Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder,System.IServiceProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).jsonObjectBinder}

The binder for converting JSON payloads into request objects\.

###### `serviceProvider` [System\.IServiceProvider](https://learn.microsoft.com/en-us/dotnet/api/system.iserviceprovider 'System\.IServiceProvider') {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.RequestObjectFetcher(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher_,Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder,System.IServiceProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).serviceProvider}

The service provider used for resolving dependencies at runtime\.

###### `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.Features.RequestObject.RequestObjectFetcher.RequestObjectFetcher(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher_,Abblix.Oidc.Server.Common.Interfaces.IJsonObjectBinder,System.IServiceProvider,Microsoft.Extensions.Options.IOptionsSnapshot_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}

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 {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_)}

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

```csharp
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` {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).T}

The type of the request model\.
#### Parameters

###### `request` [T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).T 'Abblix\.Oidc\.Server\.Features\.RequestObject\.RequestObjectFetcher\.FetchAsync\<T\>\(T, string, System\.Func\<Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo,string\>\)\.T') {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).request}

The initial request model to bind the JWT payload to\.

###### `requestObject` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).requestObject}

The JWT contained within the request, if any\.

###### `requiredSigningAlgorithm` [System\.Func&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.func-2 'System\.Func\`2')[ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo')[,](https://learn.microsoft.com/en-us/dotnet/api/system.func-2 'System\.Func\`2')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.func-2 'System\.Func\`2') {#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).requiredSigningAlgorithm}

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&lt;T&gt;\(T, string, Func&lt;ClientInfo,string&gt;\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher#Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_) 'Abblix\.Oidc\.Server\.Features\.RequestObject\.IRequestObjectFetcher\.FetchAsync\<T\>\(T, string, System\.Func\<Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo,string\>\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[Abblix\.Utils\.Result&lt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[T](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher#Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).T 'Abblix\.Oidc\.Server\.Features\.RequestObject\.RequestObjectFetcher\.FetchAsync\<T\>\(T, string, System\.Func\<Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo,string\>\)\.T')[,](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 '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://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task representing the asynchronous operation\. The task result contains an [Abblix\.Utils\.Result&lt;&gt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2')
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\.
