#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.DeclarativeBinding](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.DeclarativeBinding '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](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.DeclarativeBinding.AllowedValuesAttribute#Abblix.Oidc.Server.DeclarativeBinding.AllowedValuesAttribute.AllowedValues 'Abblix\.Oidc\.Server\.DeclarativeBinding\.AllowedValuesAttribute\.AllowedValues');
null values are not flagged here\.

```csharp
public class AllowedValuesAttribute : System.Attribute
```

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

## AllowedValuesAttribute\(string\[\]\) Constructor {#Abblix.Oidc.Server.DeclarativeBinding.AllowedValuesAttribute.AllowedValuesAttribute(string[])}

Creates an [AllowedValuesAttribute](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.DeclarativeBinding.AllowedValuesAttribute 'Abblix\.Oidc\.Server\.DeclarativeBinding\.AllowedValuesAttribute') declaring the set of accepted values\.

```csharp
public AllowedValuesAttribute(params string[] allowedValues);
```
#### Parameters

###### `allowedValues` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array') {#Abblix.Oidc.Server.DeclarativeBinding.AllowedValuesAttribute.AllowedValuesAttribute(string[]).allowedValues}

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

## AllowedValuesAttribute\.AllowedValues Property {#Abblix.Oidc.Server.DeclarativeBinding.AllowedValuesAttribute.AllowedValues}

The set of acceptable string values declared at attribute construction\.

```csharp
public string[] AllowedValues { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')
