ISubjectTypeConverter Interface
Defines the interface for a service that converts user subject identifiers according to the client's specified subject type. This conversion ensures that the subject identifier presented to the client is in the format that the client expects, based on its configuration.
public interface ISubjectTypeConverterDerived
↳ SubjectTypeConverter
Remarks
The implementation of this interface should support various subject types, such as "public" or "pairwise", and provide appropriate conversions based on the OpenID Connect specifications.
Properties
ISubjectTypeConverter.SubjectTypesSupported Property
Lists the subject types that this converter supports. This typically includes "public" and "pairwise" among others, depending on the OpenID Connect implementation specifics.
System.Collections.Generic.IEnumerable<string> SubjectTypesSupported { get; }Property Value
System.Collections.Generic.IEnumerable<System.String>
Methods
ISubjectTypeConverter.Convert(string, ClientInfo) Method
Converts the real subject identifier into the client-facing one based on the client's subject type: a pairwise client gets a reversible, per-sector pseudonym; a public client gets the subject unchanged.
string Convert(string subject, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);Parameters
subject System.String
The original subject identifier of the end-user.
clientInfo ClientInfo
Information about the client for which the subject identifier is being transformed.
Returns
System.String
The transformed subject identifier suitable for the client's subject type.
ISubjectTypeConverter.ConvertBack(string, ClientInfo) Method
Recovers the real subject identifier from the client-facing one produced by Convert(string, ClientInfo): a pairwise client's pseudonym is opened back to the real subject; a public client's subject is returned unchanged. The clientInfo must be the client the subject was sealed for, as its sector binds the pseudonym.
string? ConvertBack(string subject, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);Parameters
subject System.String
The client-facing subject identifier (pairwise pseudonym or real subject).
clientInfo ClientInfo
The client the subject was issued for.
Returns
System.String
The real subject identifier, or null when a pairwise pseudonym cannot be opened (malformed,
sealed for a different sector, or produced under a different pairwise salt) so the caller can reject the
token at the protocol level.
Exceptions
System.InvalidOperationException
Thrown only when pairwise identifiers are not configured
but a pairwise client is asked to recover, which is a server misconfiguration rather than a bad token.