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

## DPoPTokenEndpointValidator Class

Token\-endpoint enforcement of RFC 9449 DPoP: validates the proof JWT carried on the
inbound `DPoP` header against the request's method\+URI, runs the layered
nonce\-policy if the deployment requires it, and stashes the proof's JWK thumbprint on
the validation context so the processor can bind `cnf.jkt` onto the issued access
token\.

```csharp
public class DPoPTokenEndpointValidator : Abblix.Oidc.Server.Features.DPoP.DPoPNonceValidator, Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [DPoPNonceValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.DPoP.DPoPNonceValidator 'Abblix\.Oidc\.Server\.Features\.DPoP\.DPoPNonceValidator') → DPoPTokenEndpointValidator

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

### Remarks
Sits AFTER [ClientValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.ClientValidator 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.ClientValidator') in the composite — that ordering is
load\-bearing because this step reads [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext#Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext.ClientInfo 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.TokenValidationContext\.ClientInfo')
to decide whether DPoP is mandatory \([RequireDPoP](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo#Abblix.Oidc.Server.Features.ClientInformation.ClientInfo.RequireDPoP 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\.RequireDPoP')\)
or opportunistic\. When the client opts in but the proof is missing, the request is
rejected with `invalid_dpop_proof`; when the client does not opt in, a missing
proof is silently accepted \(Bearer token issued downstream\) and a present\-and\-valid
proof still binds the token \(RFC 9449 §5\.2 server\-side opportunistic binding\)\.
### Constructors

## DPoPTokenEndpointValidator\(ILogger\<DPoPTokenEndpointValidator\>, IProofValidator, INonceService, IOptionsMonitor\<OidcOptions\>\) Constructor {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.DPoPTokenEndpointValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator_,Abblix.Oidc.Server.Features.DPoP.IProofValidator,Abblix.Oidc.Server.Features.Nonces.INonceService,Microsoft.Extensions.Options.IOptionsMonitor_Abblix.Oidc.Server.Common.Configuration.OidcOptions_)}

Token\-endpoint enforcement of RFC 9449 DPoP: validates the proof JWT carried on the
inbound `DPoP` header against the request's method\+URI, runs the layered
nonce\-policy if the deployment requires it, and stashes the proof's JWK thumbprint on
the validation context so the processor can bind `cnf.jkt` onto the issued access
token\.

```csharp
public DPoPTokenEndpointValidator(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator> logger, Abblix.Oidc.Server.Features.DPoP.IProofValidator proofValidator, Abblix.Oidc.Server.Features.Nonces.INonceService nonceService, Microsoft.Extensions.Options.IOptionsMonitor<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')[DPoPTokenEndpointValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.DPoPTokenEndpointValidator')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.DPoPTokenEndpointValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator_,Abblix.Oidc.Server.Features.DPoP.IProofValidator,Abblix.Oidc.Server.Features.Nonces.INonceService,Microsoft.Extensions.Options.IOptionsMonitor_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).logger}

###### `proofValidator` [IProofValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.DPoP.IProofValidator 'Abblix\.Oidc\.Server\.Features\.DPoP\.IProofValidator') {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.DPoPTokenEndpointValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator_,Abblix.Oidc.Server.Features.DPoP.IProofValidator,Abblix.Oidc.Server.Features.Nonces.INonceService,Microsoft.Extensions.Options.IOptionsMonitor_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).proofValidator}

###### `nonceService` [INonceService](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Nonces.INonceService 'Abblix\.Oidc\.Server\.Features\.Nonces\.INonceService') {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.DPoPTokenEndpointValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator_,Abblix.Oidc.Server.Features.DPoP.IProofValidator,Abblix.Oidc.Server.Features.Nonces.INonceService,Microsoft.Extensions.Options.IOptionsMonitor_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).nonceService}

###### `options` [Microsoft\.Extensions\.Options\.IOptionsMonitor&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptionsmonitor-1 'Microsoft\.Extensions\.Options\.IOptionsMonitor\`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.ioptionsmonitor-1 'Microsoft\.Extensions\.Options\.IOptionsMonitor\`1') {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.DPoPTokenEndpointValidator(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator_,Abblix.Oidc.Server.Features.DPoP.IProofValidator,Abblix.Oidc.Server.Features.Nonces.INonceService,Microsoft.Extensions.Options.IOptionsMonitor_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}

### Remarks
Sits AFTER [ClientValidator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.ClientValidator 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.ClientValidator') in the composite — that ordering is
load\-bearing because this step reads [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext#Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext.ClientInfo 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.TokenValidationContext\.ClientInfo')
to decide whether DPoP is mandatory \([RequireDPoP](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo#Abblix.Oidc.Server.Features.ClientInformation.ClientInfo.RequireDPoP 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\.RequireDPoP')\)
or opportunistic\. When the client opts in but the proof is missing, the request is
rejected with `invalid_dpop_proof`; when the client does not opt in, a missing
proof is silently accepted \(Bearer token issued downstream\) and a present\-and\-valid
proof still binds the token \(RFC 9449 §5\.2 server\-side opportunistic binding\)\.
### Methods

## DPoPTokenEndpointValidator\.ValidateAsync\(TokenValidationContext\) Method {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.ValidateAsync(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext)}

Asynchronously validates the token request within the provided context, checking for compliance with
the necessary validation rules such as client authentication, scope validation, grant validation, etc\.

```csharp
public System.Threading.Tasks.Task<Abblix.Oidc.Server.Common.OidcError?> ValidateAsync(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext context);
```
#### Parameters

###### `context` [TokenValidationContext](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.TokenValidationContext') {#Abblix.Oidc.Server.Endpoints.Token.Validation.DPoPTokenEndpointValidator.ValidateAsync(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext).context}

The context containing the token request and related information that needs to be validated\.

Implements [ValidateAsync\(TokenValidationContext\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator#Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator.ValidateAsync(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext) 'Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.ITokenContextValidator\.ValidateAsync\(Abblix\.Oidc\.Server\.Endpoints\.Token\.Validation\.TokenValidationContext\)')

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[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/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A [OidcError](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.OidcError 'Abblix\.Oidc\.Server\.Common\.OidcError') containing error details if the validation fails;
otherwise, returns null indicating that the validation was successful\.
