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

## IAuthorizationGrantHandler Interface

Strategy contract for resolving the `grant_type`\-specific portion of an OAuth 2\.0 token
request \(RFC 6749 §4\) into an [AuthorizedGrant](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces.AuthorizedGrant 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces\.AuthorizedGrant'): an authentication session plus the
[AuthorizationContext](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.AuthorizationContext 'Abblix\.Oidc\.Server\.Common\.AuthorizationContext') \(subject, scope, resources, claims\) that the issued tokens
will inherit\. Each implementation advertises the grant types it owns via
[GrantTypesSupported](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IGrantTypeInformer#Abblix.Oidc.Server.Common.Interfaces.IGrantTypeInformer.GrantTypesSupported 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IGrantTypeInformer\.GrantTypesSupported')\.

```csharp
public interface IAuthorizationGrantHandler : Abblix.Oidc.Server.Common.Interfaces.IGrantTypeInformer
```

Derived  
↳ [AuthorizationCodeGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.AuthorizationCodeGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.AuthorizationCodeGrantHandler')  
↳ [BackChannelAuthenticationGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.BackChannelAuthenticationGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.BackChannelAuthenticationGrantHandler')  
↳ [ClientCredentialsGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.ClientCredentialsGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.ClientCredentialsGrantHandler')  
↳ [CompositeAuthorizationGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.CompositeAuthorizationGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.CompositeAuthorizationGrantHandler')  
↳ [DeviceCodeGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.DeviceCodeGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.DeviceCodeGrantHandler')  
↳ [JwtBearerGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.JwtBearerGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.JwtBearerGrantHandler')  
↳ [PasswordGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.PasswordGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.PasswordGrantHandler')  
↳ [RefreshTokenGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.RefreshTokenGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.RefreshTokenGrantHandler')  
↳ [TokenExchangeGrantHandler](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.TokenExchangeGrantHandler 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.TokenExchangeGrantHandler')

Implements [IGrantTypeInformer](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IGrantTypeInformer 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IGrantTypeInformer')
### Methods

## IAuthorizationGrantHandler\.AuthorizeAsync\(TokenRequest, ClientInfo\) Method {#Abblix.Oidc.Server.Endpoints.Token.Grants.IAuthorizationGrantHandler.AuthorizeAsync(Abblix.Oidc.Server.Model.TokenRequest,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo)}

Resolves the grant\-specific input from [request](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Grants.IAuthorizationGrantHandler#Abblix.Oidc.Server.Endpoints.Token.Grants.IAuthorizationGrantHandler.AuthorizeAsync(Abblix.Oidc.Server.Model.TokenRequest,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).request 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Grants\.IAuthorizationGrantHandler\.AuthorizeAsync\(Abblix\.Oidc\.Server\.Model\.TokenRequest, Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\)\.request') \(authorization code,
refresh token, device code, client credentials, JWT assertion, etc\.\) into the
[AuthorizedGrant](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces.AuthorizedGrant 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces\.AuthorizedGrant') that will drive token issuance, or an [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError')
such as `invalid_grant`, `authorization_pending`, or `slow_down`\.

```csharp
System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Token.Interfaces.AuthorizedGrant,Abblix.Oidc.Server.Common.OidcError>> AuthorizeAsync(Abblix.Oidc.Server.Model.TokenRequest request, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);
```
#### Parameters

###### `request` [TokenRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Model.TokenRequest 'Abblix\.Oidc\.Server\.Model\.TokenRequest') {#Abblix.Oidc.Server.Endpoints.Token.Grants.IAuthorizationGrantHandler.AuthorizeAsync(Abblix.Oidc.Server.Model.TokenRequest,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).request}

The token request \(already authenticated against the client\)\.

###### `clientInfo` [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo') {#Abblix.Oidc.Server.Endpoints.Token.Grants.IAuthorizationGrantHandler.AuthorizeAsync(Abblix.Oidc.Server.Model.TokenRequest,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).clientInfo}

The authenticated client; used to enforce that the grant was
            issued to the same client that is now redeeming it\.

#### 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')[AuthorizedGrant](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Interfaces.AuthorizedGrant 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Interfaces\.AuthorizedGrant')[,](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')
