Skip to main content

ConsentDefinition Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Consents

ConsentDefinition Class

Defines the details of user consents required for specific scopes and resources. This record is used to manage and validate user consent for accessing specific scopes, resources, and RFC 9396 Rich Authorization Requests entries, ensuring that consent is explicitly granted according to the requirements of the application and compliance standards.

public record ConsentDefinition : System.IEquatable<Abblix.Oidc.Server.Features.Consents.ConsentDefinition>

Inheritance System.Object → ConsentDefinition

Implements System.IEquatable<ConsentDefinition>

Constructors

ConsentDefinition(ScopeDefinition[], ResourceDefinition[]) Constructor

Defines the details of user consents required for specific scopes and resources. This record is used to manage and validate user consent for accessing specific scopes, resources, and RFC 9396 Rich Authorization Requests entries, ensuring that consent is explicitly granted according to the requirements of the application and compliance standards.

public ConsentDefinition(Abblix.Oidc.Server.Common.Constants.ScopeDefinition[] Scopes, Abblix.Oidc.Server.Common.Constants.ResourceDefinition[] Resources);

Parameters

Scopes ScopeDefinition[]

An array of ScopeDefinition that represents the scopes for which user consent is needed.

Resources ResourceDefinition[]

An array of ResourceDefinition that represents the resources for which user consent is needed.

Properties

ConsentDefinition.AuthorizationDetails Property

RFC 9396 authorization_details entries for which user consent is needed (in Pending) or has been granted (in Granted). The provider may return a narrower set than the request carried -- entries removed here never appear in the issued token; mutations within an entry (e.g. amount narrowed by a UI slider) survive byte-exact because storage is the raw System.Text.Json.Nodes.JsonArray. null when the request did not include authorization_details.

public System.Text.Json.Nodes.JsonArray? AuthorizationDetails { get; init; }

Property Value

System.Text.Json.Nodes.JsonArray

ConsentDefinition.Resources Property

An array of ResourceDefinition that represents the resources for which user consent is needed.

public Abblix.Oidc.Server.Common.Constants.ResourceDefinition[] Resources { get; init; }

Property Value

ResourceDefinition[]

ConsentDefinition.Scopes Property

An array of ScopeDefinition that represents the scopes for which user consent is needed.

public Abblix.Oidc.Server.Common.Constants.ScopeDefinition[] Scopes { get; init; }

Property Value

ScopeDefinition[]