#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces')

## ITokenRequestProcessor Interface

Processes incoming token requests from clients, ensuring they are valid and authorized before issuing
the appropriate token response\. Depending on the request type and granted permissions, the response can include
various types of tokens such as Access Tokens, Refresh Tokens and ID Tokens\.

```csharp
public interface ITokenRequestProcessor
```

Derived  
↳ [AuthorizationCodeReusePreventingDecorator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.AuthorizationCodeReusePreventingDecorator 'Abblix\.Oidc\.Server\.Endpoints\.Token\.AuthorizationCodeReusePreventingDecorator')  
↳ [TokenRequestProcessor](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.TokenRequestProcessor 'Abblix\.Oidc\.Server\.Endpoints\.Token\.TokenRequestProcessor')

### Remarks
This interface abstracts the core logic behind token issuance in compliance with OAuth 2\.0 and OpenID Connect
standards\. Implementations are responsible for validating the token request details, determining the types of tokens
to issue based on the request's scope and authorization, and generating a token response that conforms to
the protocol specifications\. While the typical response includes an Access Token and, in the case of OpenID Connect,
an ID Token, the exact contents of the response may vary based on the request parameters and server policies\.
### Methods

## ITokenRequestProcessor\.ProcessAsync\(ValidTokenRequest\) Method {#Abblix.Oidc.Server.Endpoints.Token.Interfaces.ITokenRequestProcessor.ProcessAsync(Abblix.Oidc.Server.Endpoints.Token.Interfaces.ValidTokenRequest)}

Asynchronously processes a validated and authorized token request, generating a token response\.

```csharp
System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Token.Interfaces.TokenIssued,Abblix.Oidc.Server.Common.OidcError>> ProcessAsync(Abblix.Oidc.Server.Endpoints.Token.Interfaces.ValidTokenRequest request);
```
#### Parameters

###### `request` [ValidTokenRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces.ValidTokenRequest 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces\.ValidTokenRequest') {#Abblix.Oidc.Server.Endpoints.Token.Interfaces.ITokenRequestProcessor.ProcessAsync(Abblix.Oidc.Server.Endpoints.Token.Interfaces.ValidTokenRequest).request}

The validated token request from the client\.

#### 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')[TokenIssued](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces.TokenIssued 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces\.TokenIssued')[,](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 that resolves to a [TokenIssued](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces.TokenIssued 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces\.TokenIssued'), encapsulating the tokens to be issued to
            the client, or an [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError') if processing fails\.
