SubjectTypeConverter Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Features.UserInfo
SubjectTypeConverter Class
Implements conversion of subject identifiers for end-users based on the subject type requested by the client. Uses HMAC-SHA256 with a server-side secret salt for pairwise identifiers, per OpenID Connect Core Section 8.1.
public class SubjectTypeConverter : Abblix.Oidc.Server.Features.UserInfo.ISubjectTypeConverter
Inheritance System.Object → SubjectTypeConverter
Implements ISubjectTypeConverter
Constructors
SubjectTypeConverter(PairwiseSubjectSettings) Constructor
Implements conversion of subject identifiers for end-users based on the subject type requested by the client. Uses HMAC-SHA256 with a server-side secret salt for pairwise identifiers, per OpenID Connect Core Section 8.1.
public SubjectTypeConverter(Abblix.Oidc.Server.Features.UserInfo.PairwiseSubjectSettings? settings=null);
Parameters
settings PairwiseSubjectSettings
Properties
SubjectTypeConverter.SubjectTypesSupported Property
The two OIDC Core §8 subject types this converter implements: public (passes the local
subject through unchanged) and pairwise (HMAC-derived per-sector identifier).
public System.Collections.Generic.IEnumerable<string> SubjectTypesSupported { get; }
Implements SubjectTypesSupported
Property Value
System.Collections.Generic.IEnumerable<System.String>
Methods
SubjectTypeConverter.Convert(string, ClientInfo) Method
Converts the subject identifier based on the client's subject type. For pairwise: HMAC(salt, UrlEncode(sector) + "&" + UrlEncode(subject)) → base64url. The HMAC algorithm is configurable via PairwiseSubjectSettings.HashAlgorithm (default: SHA256). For public: returns the original subject identifier unchanged.
public string Convert(string subject, Abblix.Oidc.Server.Features.ClientInformation.ClientInfo clientInfo);
Parameters
subject System.String
clientInfo ClientInfo
Implements Convert(string, ClientInfo)