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

## IUserConsentsProvider Interface

Defines an interface for a service that provides user consents\. This service is responsible for retrieving
and managing user consent decisions related to authorization requests\. It ensures that the application adheres
to user preferences and legal requirements concerning data access and processing\.

```csharp
public interface IUserConsentsProvider
```

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

## IUserConsentsProvider\.GetUserConsentsAsync\(ValidAuthorizationRequest, AuthSession\) Method {#Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider.GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,Abblix.Oidc.Server.Features.UserAuthentication.AuthSession)}

Asynchronously retrieves the user consents for a given authorization request and authentication session\.
This method is essential for determining which scopes and resources the user has consented to, enabling
the application to respect user permissions and comply with data protection regulations\.

```csharp
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.Consents.UserConsents> GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest request, Abblix.Oidc.Server.Features.UserAuthentication.AuthSession authSession);
```
#### Parameters

###### `request` [ValidAuthorizationRequest](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest 'Abblix\.Oidc\.Server\.Endpoints\.Authorization\.Interfaces\.ValidAuthorizationRequest') {#Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider.GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,Abblix.Oidc.Server.Features.UserAuthentication.AuthSession).request}

The validated authorization request containing the scopes and resources for which
            consent may be required\.

###### `authSession` [AuthSession](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.UserAuthentication.AuthSession 'Abblix\.Oidc\.Server\.Features\.UserAuthentication\.AuthSession') {#Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider.GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,Abblix.Oidc.Server.Features.UserAuthentication.AuthSession).authSession}

The current authentication session that provides context about the authenticated user,
            potentially influencing consent retrieval based on the user's settings or previous consent decisions\.

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[UserConsents](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.UserConsents 'Abblix\.Oidc\.Server\.Features\.Consents\.UserConsents')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
A task that resolves to an instance of [UserConsents](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.UserConsents 'Abblix\.Oidc\.Server\.Features\.Consents\.UserConsents'), containing detailed information
            about the consents granted or denied by the user\.
