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

Sergey Beryozkin <sberyozkin@gmail.com> Fri, 11 May 2012 15:13 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 660BD21F85DB for <oauth@ietfa.amsl.com>; Fri, 11 May 2012 08:13:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.199
X-Spam-Level:
X-Spam-Status: No, score=-3.199 tagged_above=-999 required=5 tests=[AWL=-0.200, 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 3UmaL1Xj75sR for <oauth@ietfa.amsl.com>; Fri, 11 May 2012 08:13:53 -0700 (PDT)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by ietfa.amsl.com (Postfix) with ESMTP id 40CFA21F8564 for <oauth@ietf.org>; Fri, 11 May 2012 08:13:53 -0700 (PDT)
Received: by eabd1 with SMTP id d1so1119941eab.31 for <oauth@ietf.org>; Fri, 11 May 2012 08:13:52 -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:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=iG4Y6yVjeEVkUFS9Ngn4nZ7c0+RaBTcZOrgo6zOYi8I=; b=vj/Sug5Mp9wAVrMVuFZ6ZslF8GEpgpots7pemf3mudtjJaUJeCZGDqINyVmvA9x4Qa wkL9jvv/Rfk6YramtO5T67R1UNlqKgWolzlFGxig1z+aoLTkUleMG1M5vyvpibLSM5tA Py96LztAkO3xW27pfpHgXuyyCsOsXGtdPpjSRIcaeX6OwaS0+f22KpyPe7Wa8PrZDbHC xExUCqcnaL92VtnE39fwhHj77tRtbfTZXb84NUnNaIWEWAFV2QVn8MvzBhnCeLl5y4yv 1NrCUecTfVBpJvimoYbufjq3e+sm7/MrIl8fNjScfreTGIhBRRN6qBGTymocod36OHJD H9Vg==
Received: by 10.14.39.84 with SMTP id c60mr2042389eeb.31.1336749232401; Fri, 11 May 2012 08:13:52 -0700 (PDT)
Received: from [10.36.226.5] ([217.173.99.61]) by mx.google.com with ESMTPS id y53sm46403747eea.3.2012.05.11.08.13.51 (version=SSLv3 cipher=OTHER); Fri, 11 May 2012 08:13:51 -0700 (PDT)
Message-ID: <4FAD2CAD.5050304@gmail.com>
Date: Fri, 11 May 2012 16:13:49 +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>
References: <4FAD1F32.4010707@gmail.com> <CE8995AB5D178F44A2154F5C9A97CAF4024FFE655F82@HE111541.emea1.cds.t-internal.com>
In-Reply-To: <CE8995AB5D178F44A2154F5C9A97CAF4024FFE655F82@HE111541.emea1.cds.t-internal.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [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 15:13:54 -0000

On 11/05/12 15:44, Axel.Nennker@telekom.de wrote:
> Oauth core does not care about the access token format.
> OpenID connect has an additional (access)token called id_token and that has a specific format.
> Oauth core does not specify access token formats and expects clients to not to introspect them. AS and RS must have common understanding of the token format.
>
Sure, however I'm not seeing what is wrong with a client attempting to 
keep an access token in some sort of structured storage which can 
accommodate the representations for the different token types.
I think it can be useful for a client to know which access token 
property is a 'key' property and which is an optional one, etc, which is 
easy enough to do with the current representations, but as I said, this 
requires the use of the specialized readers..

Not a bit issue anyway
Cheers, Sergey



> -----Original Message-----
> From: oauth-bounces@ietf.org [mailto:oauth-bounces@ietf.org] On Behalf Of Sergey Beryozkin
> Sent: Friday, May 11, 2012 4:16 PM
> To:<oauth@ietf.org>
> Subject: [OAUTH-WG] Flat Token JSON representations and generic JSON providers
>
> 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
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth