Skip to main content

AllowedValuesAttribute Class

Abblix.Oidc.Server

Abblix.Oidc.Server.DeclarativeBinding

AllowedValuesAttribute Class

Restricts a string-valued (or string-array-valued) property, field, or parameter to a fixed set of allowed values. Typically used to constrain protocol parameters such as response_type, grant_type, or code_challenge_method to the values defined by the relevant specification. Validators consuming this attribute should reject any value not present in AllowedValues; null values are not flagged here.

public class AllowedValuesAttribute : System.Attribute

Inheritance System.ObjectSystem.Attribute → AllowedValuesAttribute

Constructors

AllowedValuesAttribute(string[]) Constructor

Creates an AllowedValuesAttribute declaring the set of accepted values.

public AllowedValuesAttribute(params string[] allowedValues);

Parameters

allowedValues System.String[]

The complete set of acceptable string values; comparison is performed using the validator's configured string comparison, typically ordinal.

Properties

AllowedValuesAttribute.AllowedValues Property

The set of acceptable string values declared at attribute construction.

public string[] AllowedValues { get; }

Property Value

System.String[]