Tests whether a subject identifier refers to a known identity.
identity fields: iss, sub, sid (a session id, or an array of them), email and email_verified,
phone_number and phone_number_verified, plus any of device/application/tenant/org_unit/group as
opaque ids.
A GNAP grant is a session of its own: iya-sts names a revoked grant gnap-grant:<id> and a revoked
access token gnap-token:<jti> as the session of a complex subject. An account's sid is
therefore an array holding both, and a session-scoped event matches when it names either.
An email or phone number identifies somebody only when the AS said it was verified
(email_verified / phone_number_verified true): neither is a stable or unique identifier, and
an unverified one may be anybody's.
A top-level opaque id is compared with sub. A session is named inside a complex subject.
In a complex subject every member must match, and the members this identity can't be checked
against count as a non-match: an event about one session matches only an identity holding it.
Parameters
subId: Record<string,any>
An RFC 9493 subject identifier, e.g. a SET's sub_id
Tests whether a subject identifier refers to a known identity.
identityfields: iss, sub, sid (a session id, or an array of them), email and email_verified, phone_number and phone_number_verified, plus any of device/application/tenant/org_unit/group as opaque ids.A GNAP grant is a session of its own: iya-sts names a revoked grant
gnap-grant:<id>and a revoked access tokengnap-token:<jti>as thesessionof a complex subject. An account'ssidis therefore an array holding both, and a session-scoped event matches when it names either.email_verified/phone_number_verifiedtrue): neither is a stable or unique identifier, and an unverified one may be anybody's.sub. A session is named inside a complex subject.