Re: [OAUTH-WG] application/x-www-form-urlencoded vs JSON

Eran Hammer-Lahav <eran@hueniverse.com> Mon, 19 April 2010 21:41 UTC

Return-Path: <eran@hueniverse.com>
X-Original-To: oauth@core3.amsl.com
Delivered-To: oauth@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 970803A698F for <oauth@core3.amsl.com>; Mon, 19 Apr 2010 14:41:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.475
X-Spam-Level:
X-Spam-Status: No, score=-2.475 tagged_above=-999 required=5 tests=[AWL=0.124, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6iLKiDJs2UbV for <oauth@core3.amsl.com>; Mon, 19 Apr 2010 14:41:10 -0700 (PDT)
Received: from p3plex1out02.prod.phx3.secureserver.net (p3plex1out02.prod.phx3.secureserver.net [72.167.180.18]) by core3.amsl.com (Postfix) with SMTP id 41B8D3A6A81 for <oauth@ietf.org>; Mon, 19 Apr 2010 14:40:54 -0700 (PDT)
Received: (qmail 23561 invoked from network); 19 Apr 2010 21:40:45 -0000
Received: from unknown (HELO smtp.ex1.secureserver.net) (72.167.180.21) by p3plex1out02.prod.phx3.secureserver.net with SMTP; 19 Apr 2010 21:40:45 -0000
Received: from P3PW5EX1MB01.EX1.SECURESERVER.NET ([10.6.135.20]) by P3PW5EX1HT003.EX1.SECURESERVER.NET ([72.167.180.21]) with mapi; Mon, 19 Apr 2010 14:40:45 -0700
From: Eran Hammer-Lahav <eran@hueniverse.com>
To: Richard Barnes <rbarnes@bbn.com>, Mike Moore <blowmage@gmail.com>
Date: Mon, 19 Apr 2010 14:40:50 -0700
Thread-Topic: [OAUTH-WG] application/x-www-form-urlencoded vs JSON
Thread-Index: AcrgB14JoBOtLlRwTkamwwy5BnIdsgAAXJ/Q
Message-ID: <90C41DD21FB7C64BB94121FBBC2E723438E5C7F2E0@P3PW5EX1MB01.EX1.SECURESERVER.NET>
References: <h2yf5bedd151004190757q27927b65na3e5c5744a53526a@mail.gmail.com> <C7F1C3F0.327E6%eran@hueniverse.com> <n2lf5bedd151004190859u31ea13f4hbe2fbbe38d03de8f@mail.gmail.com> <4BCCA913.3010800@lodderstedt.net> <k2mf5bedd151004191237k27923ecfo1af9e591582027fa@mail.gmail.com> <8B217DDB-7871-4728-AFE4-9F418CC3576A@bbn.com>
In-Reply-To: <8B217DDB-7871-4728-AFE4-9F418CC3576A@bbn.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: OAuth WG <oauth@ietf.org>
Subject: Re: [OAUTH-WG] application/x-www-form-urlencoded vs JSON
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/oauth>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 19 Apr 2010 21:41:11 -0000

> -----Original Message-----
> From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf
> Of Richard Barnes
> Sent: Monday, April 19, 2010 2:29 PM
> To: Mike Moore
> Cc: OAuth WG
> Subject: Re: [OAUTH-WG] application/x-www-form-urlencoded vs JSON
> 
> On the other hand, if you've already got a JSON or XML library on hand (as
> many apps these days do), then JSON/XML is a lot easier to handle than
> form-encoded.  Plus, if you're not re-using form-encoding, then there's no
> risk of being confused with actual "forms" / request parameters.  Not trying
> to argue one side or the other, just noting that there are trade-offs.
> 
> To refine Eran's point a little, how about this proposal?

My point is that it doesn't have to cause client problems. I am not advocating (or objecting) to this approach.

> 1. Define N encodings of the OAuth parameters 2. Require servers to support
> *all* encodings 3. Require clients to support *one* encoding (and to send
> only one at a time!) 4. Require servers to respond in the encoding they
> receive
> 
> Seems like that would minimize the burden on clients, without placing a huge
> burden on servers.

This looks like a good way to do it, but it does add complexity.

EHL