SubjectIdentifier Class
A Subject Identifier: a JSON object whose contents identify a subject within some context (RFC 9493 Section 3).
public abstract class SubjectIdentifierInheritance System.Object → SubjectIdentifier
Derived
↳ AccountSubject
↳ AliasesSubject
↳ ComplexSubject
↳ DidSubject
↳ EmailSubject
↳ IpAddressesSubject
↳ IssSubSubject
↳ JwtIdSubject
↳ OpaqueSubject
↳ PhoneNumberSubject
↳ SamlAssertionIdSubject
↳ UriSubject
Remarks
RFC 9493 Section 3 requires that a Subject Identifier "MUST NOT contain any members prohibited or not described by its Identifier Format and MUST contain all members required by its Identifier Format". That rule is kept structurally rather than by a validation pass, in two halves. Each shipped subtype declares exactly the members its format describes and disallows unmapped members on deserialization, so a document carrying a member its format does not describe is rejected rather than accepted and then silently dropped by the next write. And each subtype's constructor rejects a required member that is absent or empty, so the rule binds a value built in code exactly as it binds one read off the wire.
The type says how a subject is identified, never what the subject is (RFC 9493 Section 3.1): an EmailSubject may denote the person controlling the mailbox, the mailbox itself, or anything else the transmitter and receiver both understand.
Properties
SubjectIdentifier.Format Property
The name of the Identifier Format this Subject Identifier conforms to (RFC 9493 Section 3). Values for the formats this library ships are listed in SubjectFormats.
public string Format { get; }Property Value
Remarks
The format member has its own normative sentence, distinct from the per-format member rules Abblix.SecurityEvents.Subjects.SubjectIdentifier.RequirePresent(System.String,System.String,System.String) speaks for: "A Subject Identifier ... MUST contain a 'format' member whose value is the name of that Identifier Format" (RFC 9493 Section 3).