#### [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')

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

```csharp
public interface IRequestObjectFetcher
```

Derived  
↳ [RequestObjectFetcher](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RequestObject.RequestObjectFetcher 'Abblix\.Oidc\.Server\.Features\.RequestObject\.RequestObjectFetcher')
### Methods

## IRequestObjectFetcher\.FetchAsync\<T\>\(T, string, Func\<ClientInfo,string\>\) Method {#Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher.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
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.IRequestObjectFetcher.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.IRequestObjectFetcher#Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).T 'Abblix\.Oidc\.Server\.Features\.RequestObject\.IRequestObjectFetcher\.FetchAsync\<T\>\(T, string, System\.Func\<Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo,string\>\)\.T') {#Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher.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.IRequestObjectFetcher.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.IRequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).requiredSigningAlgorithm}

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&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.IRequestObjectFetcher#Abblix.Oidc.Server.Features.RequestObject.IRequestObjectFetcher.FetchAsync_T_(T,string,System.Func_Abblix.Oidc.Server.Features.ClientInformation.ClientInfo,string_).T 'Abblix\.Oidc\.Server\.Features\.RequestObject\.IRequestObjectFetcher\.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 a [Abblix\.Utils\.Result&lt;&gt;](https://learn.microsoft.com/en-us/dotnet/api/abblix.utils.result-2 'Abblix\.Utils\.Result\`2') 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\.
