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

## JsonWebKeySettings Class

Flat configuration DTO for a single JSON Web Key, suitable for binding via
`Microsoft.Extensions.Configuration` which cannot instantiate the abstract
[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey') base type directly\. All cryptographic byte\-array members
are bound as base64url\-encoded strings per RFC 7517; [ToJsonWebKey\(\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.ToJsonWebKey() 'Abblix\.Oidc\.Server\.Common\.Configuration\.JsonWebKeySettings\.ToJsonWebKey\(\)')
decodes them and maps the flat shape to the correct concrete subtype based on
[Kty](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Kty 'Abblix\.Oidc\.Server\.Common\.Configuration\.JsonWebKeySettings\.Kty')\.

```csharp
public sealed class JsonWebKeySettings
```

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

### Remarks

Design rationale: a flat DTO that mirrors the RFC 7517 wire format keeps the
configuration path free of `System.Text.Json` roundtrips and custom converters.
Every JWK member binds out-of-the-box as a nullable string, the mapper handles
base64url decoding and the `kty` dispatch in one place, and the schema lives as
explicit C# code — refactor-safe and IntelliSense-friendly. The configuration binder
itself produces path-aware error messages on invalid input, so operators do not have
to translate generic JSON exceptions back to config paths.

Each property carries a [Microsoft\.Extensions\.Configuration\.ConfigurationKeyNameAttribute](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.configurationkeynameattribute 'Microsoft\.Extensions\.Configuration\.ConfigurationKeyNameAttribute') pointing at the
RFC 7517 wire name from [JsonWebKeyPropertyNames](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKeyPropertyNames 'Abblix\.Jwt\.JsonWebKeyPropertyNames'), so config keys can be
written exactly as JWK consumers expect them (`kty`, `n`, `e`, …) and
the binder maps them unambiguously to the C# properties.

A native polymorphic binding via `[JsonPolymorphic]` + `[JsonDerivedType]`
was considered and rejected after empirical verification on net8.0 / net9.0 / net10.0:
`Microsoft.Extensions.Configuration.Binder` does not honour these
`System.Text.Json` attributes and still throws «Cannot create instance of
abstract type» on [JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey'). The flat DTO is the practical workaround
until the binder gains its own polymorphism support.

Adding support for a new JWK type that the RFC introduces (for example OKP per
RFC 8037 for Ed25519 / X25519 keys) is a fully localised change: add the new fields
to this DTO and a new branch in the `Kty` switch inside [ToJsonWebKey\(\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.ToJsonWebKey() 'Abblix\.Oidc\.Server\.Common\.Configuration\.JsonWebKeySettings\.ToJsonWebKey\(\)').
No changes required in the polymorphic [JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey') hierarchy beyond the
new concrete subtype itself.
### Properties

## JsonWebKeySettings\.Alg Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Alg}

Algorithm intended for use with this key\.

```csharp
public string? Alg { get; init; }
```

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

## JsonWebKeySettings\.Crv Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Crv}

EC curve identifier \(crv\): `P-256`, `P-384`, or `P-521`\.

```csharp
public string? Crv { get; init; }
```

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

## JsonWebKeySettings\.D Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.D}

RSA or EC private exponent / key \(d\)\.

```csharp
public string? D { get; init; }
```

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

## JsonWebKeySettings\.Dp Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Dp}

RSA first factor CRT exponent \(dp\)\.

```csharp
public string? Dp { get; init; }
```

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

## JsonWebKeySettings\.Dq Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Dq}

RSA second factor CRT exponent \(dq\)\.

```csharp
public string? Dq { get; init; }
```

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

## JsonWebKeySettings\.E Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.E}

RSA public exponent \(e\)\.

```csharp
public string? E { get; init; }
```

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

## JsonWebKeySettings\.K Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.K}

Symmetric \(oct\) key value\.

```csharp
public string? K { get; init; }
```

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

## JsonWebKeySettings\.Kid Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Kid}

Key ID for selection in multi\-key environments\.

```csharp
public string? Kid { get; init; }
```

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

## JsonWebKeySettings\.Kty Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Kty}

Key type discriminator: `RSA`, `EC`, or `oct`\.

```csharp
public string? Kty { get; init; }
```

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

## JsonWebKeySettings\.N Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.N}

RSA modulus \(n\)\.

```csharp
public string? N { get; init; }
```

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

## JsonWebKeySettings\.P Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.P}

RSA first prime factor \(p\)\.

```csharp
public string? P { get; init; }
```

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

## JsonWebKeySettings\.Q Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Q}

RSA second prime factor \(q\)\.

```csharp
public string? Q { get; init; }
```

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

## JsonWebKeySettings\.Qi Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Qi}

RSA first CRT coefficient \(qi\)\.

```csharp
public string? Qi { get; init; }
```

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

## JsonWebKeySettings\.Use Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Use}

Public key use: `sig` or `enc`\.

```csharp
public string? Use { get; init; }
```

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

## JsonWebKeySettings\.X Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.X}

EC X coordinate\.

```csharp
public string? X { get; init; }
```

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

## JsonWebKeySettings\.Y Property {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Y}

EC Y coordinate\.

```csharp
public string? Y { get; init; }
```

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

## JsonWebKeySettings\.ToJsonWebKey\(\) Method {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.ToJsonWebKey()}

Maps this flat DTO to the corresponding concrete [JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey') subtype\.

```csharp
public Abblix.Jwt.JsonWebKey ToJsonWebKey();
```

#### Returns
[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
[Kty](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.Kty 'Abblix\.Oidc\.Server\.Common\.Configuration\.JsonWebKeySettings\.Kty') is missing or not `RSA`/`EC`/`oct`\.

[System\.FormatException](https://learn.microsoft.com/en-us/dotnet/api/system.formatexception 'System\.FormatException')  
A byte\-array member is not valid base64url\.
### Operators

## JsonWebKeySettings\.implicit operator JsonWebKey\(JsonWebKeySettings\) Operator {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.op_ImplicitAbblix.Jwt.JsonWebKey(Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings)}

Convenience implicit conversion to [JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey');
            delegates to [ToJsonWebKey\(\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.ToJsonWebKey() 'Abblix\.Oidc\.Server\.Common\.Configuration\.JsonWebKeySettings\.ToJsonWebKey\(\)')\.

```csharp
public static Abblix.Jwt.JsonWebKey implicit operator Abblix.Jwt.JsonWebKey(Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings settings);
```
#### Parameters

###### `settings` [JsonWebKeySettings](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings 'Abblix\.Oidc\.Server\.Common\.Configuration\.JsonWebKeySettings') {#Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings.op_ImplicitAbblix.Jwt.JsonWebKey(Abblix.Oidc.Server.Common.Configuration.JsonWebKeySettings).settings}

#### Returns
[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')
