[OAUTH-WG] Flat Token JSON representations and generic JSON providers

Sergey Beryozkin <sberyozkin@gmail.com> Fri, 11 May 2012 14:16 UTC

Return-Path: <sberyozkin@gmail.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B7C821F8739 for <oauth@ietfa.amsl.com>; Fri, 11 May 2012 07:16:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.299
X-Spam-Level:
X-Spam-Status: No, score=-3.299 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, J_CHICKENPOX_36=0.6, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SGfp8eEu953j for <oauth@ietfa.amsl.com>; Fri, 11 May 2012 07:16:25 -0700 (PDT)
Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id 97ED421F8737 for <oauth@ietf.org>; Fri, 11 May 2012 07:16:22 -0700 (PDT)
Received: by bkty8 with SMTP id y8so2645415bkt.31 for <oauth@ietf.org>; Fri, 11 May 2012 07:16:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=knzvJq4WLxoQ9xB0TYW8UeXC39tkP5QiMkK/P/ZVGxM=; b=l/IyVIP/sOMFf3TzMRLw+9zGQmfp2qWUuvYHLaI6C7qRga2kzAltnMN333rbMHUFJk V7ke7iZnYk2nSeIz4xVUlRszkCbbxARtgreU/9YuacDpvxxSM6MKXCUWWZg1lXOlixAC Q2uGtFpvDviEQNSeJ51pmjQqMdro7kXSkTQkVM8ovOp1GrSGT+mxUoqRLBGHgvjMO5Ee gXyHGA0raLFHy4EyK4NRhz4ZdKubaJ8/h8oPtO/wib3GuBQh4/kGYAWrwOOw0gyoatBW O9qv/jNxjL3V9pAhwZPXuCBTeTdb4YBHfc1C4Xww+hQ1emTnLQTBOPSnWZ0lAjv16ZyM 1elA==
Received: by 10.204.152.132 with SMTP id g4mr5172931bkw.88.1336745779895; Fri, 11 May 2012 07:16:19 -0700 (PDT)
Received: from [10.36.226.5] ([217.173.99.61]) by mx.google.com with ESMTPS id z14sm18858855bky.15.2012.05.11.07.16.19 (version=SSLv3 cipher=OTHER); Fri, 11 May 2012 07:16:19 -0700 (PDT)
Message-ID: <4FAD1F32.4010707@gmail.com>
Date: Fri, 11 May 2012 15:16:18 +0100
From: Sergey Beryozkin <sberyozkin@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: "<oauth@ietf.org>" <oauth@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: [OAUTH-WG] Flat Token JSON representations and generic JSON providers
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Fri, 11 May 2012 14:16:26 -0000

Hi

AccessToken representations are flat. For example, the token 
representation may have a token id, type, plus few additional 
parameters, all being the siblings.

This requires using the specialized JSON providers in case when generic 
structured token or error representations are used. For example, given 
the following in Java:
public class AccessToken {
   String key;
   String type;
   Map<String, String> additionalProperties;
}

it is difficult to use the generic JSON providers to correctly read a 
sequence of name/value pairs into an instance of AccessToken.

It is not the major issue but I wonder would it be feasible to consider 
introducing a simple container element for all the optional properties 
which may be available in a given access token representation ? Probably 
too late to consider but I'm sending the message just in case anyway


Cheers, Sergey