public static function getSubjectIdentity($subject)
    {
        if ($subject instanceof SubjectIdentityInterface) {
            return $subject;
        }

        if (\is_string($subject)) {
            return SubjectIdentity::fromClassname($subject);
        }

        if (\is_object($subject)) {
            return SubjectIdentity::fromObject($subject);
        }

        throw new UnexpectedTypeException($subject, SubjectIdentityInterface::class.'|object|string');
    }