1

以下のgithubリンクからJWT Encode関数を使用しようとしています。この JWT は Google ウォレットで使用され、トークンの最後のセクションはオブジェクトです。誰かが「リクエスト」セクションの正しい構文を教えてくれますか? Visual Studio エディターで構文エラーが発生します。

         public static string CreateJWT(int JobID)
   {
       var payload = new Dictionary<string, object>() {

            { "iss", "17114776323338359428" },
            { "aud", "Google" },
            { "typ", "google/payments/inapp/item/v1" },
            { "exp", "1309988959" },
            { "iat", "1409988959" },
            { "request", 
                  "name", "Piece of Cake",
                  "description", "Virtual chocolate cake to fill your virtual tummy",
                  "price", "10.50",
                  "currencyCode", "USD",
                  "sellerData", "user_id:1224245,offer_code:3098576987,affiliate:aksdfbovu9j" 
            }

        };

        var secretKey = "s_F084...";
        string token = JWT.JsonWebToken.Encode(payload, secretKey, JWT.JwtHashAlgorithm.HS256);
        return token;
   }
4

2 に答える 2