oidc-caep-client
    Preparing search index...

    Function subjectMatches

    • Tests whether a subject identifier refers to a known identity.

      identity fields: iss, sub, sid (session id), email and email_verified, phone_number and phone_number_verified, plus any of device/application/tenant/org_unit/group as opaque ids.

      • An email or phone number identifies somebody only when the OP said it was verified (email_verified / phone_number_verified true): OIDC Core §5.7 makes neither 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 that sid.

      Parameters

      • subId: Record<string, any>

        An RFC 9493 subject identifier, e.g. a SET's sub_id

      • identity: Record<string, any>

      Returns boolean