#### [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')

## PromptConsentDecorator Class

Honours the OIDC Core §3\.1\.2\.1 `prompt=consent` parameter by short\-circuiting the wrapped
[IUserConsentsProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider 'Abblix\.Oidc\.Server\.Features\.Consents\.IUserConsentsProvider'): when the client explicitly requests consent re\-confirmation,
every requested scope and resource is forced into the pending bucket so the consent UI is shown
even if the user previously granted it\. For any other prompt value the decorator delegates to the
inner provider unchanged\.

```csharp
public class PromptConsentDecorator : Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider
```

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

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

## PromptConsentDecorator\(IUserConsentsProvider\) Constructor {#Abblix.Oidc.Server.Features.Consents.PromptConsentDecorator.PromptConsentDecorator(Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider)}

Honours the OIDC Core §3\.1\.2\.1 `prompt=consent` parameter by short\-circuiting the wrapped
[IUserConsentsProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider 'Abblix\.Oidc\.Server\.Features\.Consents\.IUserConsentsProvider'): when the client explicitly requests consent re\-confirmation,
every requested scope and resource is forced into the pending bucket so the consent UI is shown
even if the user previously granted it\. For any other prompt value the decorator delegates to the
inner provider unchanged\.

```csharp
public PromptConsentDecorator(Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider inner);
```
#### Parameters

###### `inner` [IUserConsentsProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider 'Abblix\.Oidc\.Server\.Features\.Consents\.IUserConsentsProvider') {#Abblix.Oidc.Server.Features.Consents.PromptConsentDecorator.PromptConsentDecorator(Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider).inner}

The wrapped consent provider used when `prompt=consent` is not requested\.
### Methods

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

If the authorization request carries `prompt=consent`, returns all requested scopes and
resources as [Pending](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.UserConsents#Abblix.Oidc.Server.Features.Consents.UserConsents.Pending 'Abblix\.Oidc\.Server\.Features\.Consents\.UserConsents\.Pending') to force a fresh consent prompt; otherwise
delegates to the wrapped provider\.

```csharp
public 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.PromptConsentDecorator.GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,Abblix.Oidc.Server.Features.UserAuthentication.AuthSession).request}

The validated authorization request whose `prompt` parameter drives the decision\.

###### `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.PromptConsentDecorator.GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,Abblix.Oidc.Server.Features.UserAuthentication.AuthSession).authSession}

The current authentication session forwarded to the inner provider\.

Implements [GetUserConsentsAsync\(ValidAuthorizationRequest, AuthSession\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider#Abblix.Oidc.Server.Features.Consents.IUserConsentsProvider.GetUserConsentsAsync(Abblix.Oidc.Server.Endpoints.Authorization.Interfaces.ValidAuthorizationRequest,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\)')

#### 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')
