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

## ScopeValidator Class

Validates the scopes in OAuth 2\.0 authorization requests for backchannel authentication\.
This validator ensures that the requested scopes are allowed based on the client's configuration
and the type of OAuth flow being used\. It checks for scope compatibility and prevents unauthorized
or excessive scope requests, reinforcing the security policies and minimizing scope\-related vulnerabilities\.

```csharp
public class ScopeValidator : Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.IBackChannelAuthenticationContextValidator
```

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

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

## ScopeValidator\(IScopeManager\) Constructor {#Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.ScopeValidator.ScopeValidator(Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager)}

Validates the scopes in OAuth 2\.0 authorization requests for backchannel authentication\.
This validator ensures that the requested scopes are allowed based on the client's configuration
and the type of OAuth flow being used\. It checks for scope compatibility and prevents unauthorized
or excessive scope requests, reinforcing the security policies and minimizing scope\-related vulnerabilities\.

```csharp
public ScopeValidator(Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager scopeManager);
```
#### Parameters

###### `scopeManager` [IScopeManager](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager 'Abblix\.Oidc\.Server\.Features\.ScopeManagement\.IScopeManager') {#Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.ScopeValidator.ScopeValidator(Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager).scopeManager}

The scope manager used to validate scopes\.
### Methods

## ScopeValidator\.ValidateAsync\(BackChannelAuthenticationValidationContext\) Method {#Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.ScopeValidator.ValidateAsync(Abblix.Oidc.Server.Endpoints.BackChannelAuthentication.Validation.BackChannelAuthenticationValidationContext)}

Validates the scopes in the context of the backchannel authentication request, checking if
they align with the client's permissions and the OAuth flow\. This method prevents the client
from requesting unauthorized scopes, such as offline access,
unless explicitly allowed by the client's configuration\.

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

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

The validation context that includes details about the request and the client\.

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

#### 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') if the scope validation fails,
or null if the scopes in the request are valid\.
