public function validate(string $content, string $aud, string $token): void
    {
        $actualToken = PbjxToken::fromString($token);
        $expectedToken = PbjxToken::create(
            $content,
            $aud,
            $actualToken->getKid(),
            $this->getSecret($actualToken->getKid()),
            [
                'exp' => $actualToken->getExp(),
                'iat' => $actualToken->getIat(),
            ]
        );

        if (!$actualToken->equals($expectedToken)) {
            throw new \InvalidArgumentException('PbjxTokens do not match.', Code::INVALID_ARGUMENT);
        }
    }