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

## SubjectTypeConverter Class

Implements the OIDC Core Section 8 subject types\. A public client's subject passes through unchanged\. A pairwise
client's subject is sealed into a per\-sector pseudonym that is stable \(the same user and sector always map to
the same value\), opaque and unlinkable to outsiders, yet reversible by this server \- so the real subject rides
inside the pseudonym itself and no separate protected claim is needed\. The seal is a deterministic \(SIV\-style\)
authenticated encryption keyed by the pairwise salt and bound to the sector as associated data, so different
sectors seal the same user to unlinkable values and a pseudonym cannot be opened under the wrong sector\.

```csharp
public class SubjectTypeConverter : Abblix.Oidc.Server.Features.PairwiseIdentifiers.ISubjectTypeConverter
```

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

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

## SubjectTypeConverter\(PairwiseSubjectSettings\) Constructor {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.SubjectTypeConverter(Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings)}

Creates the converter\. When [settings](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.SubjectTypeConverter(Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings).settings 'Abblix\.Oidc\.Server\.Features\.PairwiseIdentifiers\.SubjectTypeConverter\.SubjectTypeConverter\(Abblix\.Oidc\.Server\.Features\.PairwiseIdentifiers\.PairwiseSubjectSettings\)\.settings') is present, its salt keys the reversible pairwise
seal and its hash selects the pseudorandom function; when absent, only public subjects are supported and a
pairwise request fails loud\.

```csharp
public SubjectTypeConverter(Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings? settings=null);
```
#### Parameters

###### `settings` [PairwiseSubjectSettings](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings 'Abblix\.Oidc\.Server\.Features\.PairwiseIdentifiers\.PairwiseSubjectSettings') {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.SubjectTypeConverter(Abblix.Oidc.Server.Features.PairwiseIdentifiers.PairwiseSubjectSettings).settings}

The pairwise salt and hash, or null when pairwise identifiers are not configured\.
### Properties

## SubjectTypeConverter\.SubjectTypesSupported Property {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.SubjectTypesSupported}

The two OIDC Core Section 8 subject types this converter implements: `public` \(passes the local
subject through unchanged\) and `pairwise` \(a reversible, per\-sector sealed identifier\)\.

```csharp
public System.Collections.Generic.IEnumerable<string> SubjectTypesSupported { get; }
```

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

#### Property Value
[System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')
### Methods

## SubjectTypeConverter\.Convert\(string, ClientInfo\) Method {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.Convert(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo)}

Converts the real subject into the client\-facing subject: for a pairwise client, the reversible per\-sector
pseudonym; for a public client, the subject unchanged\.

```csharp
public string Convert(string subject, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);
```
#### Parameters

###### `subject` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.Convert(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).subject}

###### `clientInfo` [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo') {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.Convert(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).clientInfo}

Implements [Convert\(string, ClientInfo\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.PairwiseIdentifiers.ISubjectTypeConverter#Abblix.Oidc.Server.Features.PairwiseIdentifiers.ISubjectTypeConverter.Convert(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo) 'Abblix\.Oidc\.Server\.Features\.PairwiseIdentifiers\.ISubjectTypeConverter\.Convert\(string, Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\)')

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

## SubjectTypeConverter\.ConvertBack\(string, ClientInfo\) Method {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.ConvertBack(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo)}

Recovers the real subject from the client\-facing subject: for a pairwise client, opens the per\-sector
pseudonym; for a public client, returns the subject unchanged\. Returns `null` when a pairwise pseudonym
cannot be opened, so the caller can surface a protocol\-level rejection instead of faulting\.

```csharp
public string? ConvertBack(string subject, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);
```
#### Parameters

###### `subject` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.ConvertBack(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).subject}

###### `clientInfo` [ClientInfo](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ClientInformation.ClientInfo 'Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo') {#Abblix.Oidc.Server.Features.PairwiseIdentifiers.SubjectTypeConverter.ConvertBack(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo).clientInfo}

Implements [ConvertBack\(string, ClientInfo\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.PairwiseIdentifiers.ISubjectTypeConverter#Abblix.Oidc.Server.Features.PairwiseIdentifiers.ISubjectTypeConverter.ConvertBack(string,Abblix.Oidc.Server.Features.ClientInformation.ClientInfo) 'Abblix\.Oidc\.Server\.Features\.PairwiseIdentifiers\.ISubjectTypeConverter\.ConvertBack\(string, Abblix\.Oidc\.Server\.Features\.ClientInformation\.ClientInfo\)')

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