Return-Path: X-Original-To: apmail-shindig-dev-archive@www.apache.org Delivered-To: apmail-shindig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44DDD9663 for ; Fri, 27 Jan 2012 20:31:56 +0000 (UTC) Received: (qmail 10719 invoked by uid 500); 27 Jan 2012 20:31:56 -0000 Delivered-To: apmail-shindig-dev-archive@shindig.apache.org Received: (qmail 10599 invoked by uid 500); 27 Jan 2012 20:31:55 -0000 Mailing-List: contact dev-help@shindig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shindig.apache.org Delivered-To: mailing list dev@shindig.apache.org Received: (qmail 10591 invoked by uid 99); 27 Jan 2012 20:31:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2012 20:31:55 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [132.174.29.209] (HELO mshieldserver1.oclc.org) (132.174.29.209) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 27 Jan 2012 20:31:47 +0000 Received: From OAEXCH2SERVER.oa.oclc.org ([132.174.29.220]) by mshieldserver1.oclc.org (WebShield SMTP v4.5 MR3) id 1327696285959; Fri, 27 Jan 2012 15:31:25 -0500 Received: from 132.174.105.36 ([132.174.105.36]) by OAEXCH2SERVER.oa.oclc.org ([132.174.29.212]) via Exchange Front-End Server owa2.oclc.org ([132.174.29.192]) with Microsoft Exchange Server HTTP-DAV ; Fri, 27 Jan 2012 20:25:04 +0000 User-Agent: Microsoft-Entourage/12.32.0.111121 Date: Fri, 27 Jan 2012 15:25:04 -0500 Subject: Re: OAuth2RequestParameterGenerator From: daviesd To: shindig Message-ID: Thread-Topic: OAuth2RequestParameterGenerator Thread-Index: AczdKTY4zbsUhq8hs0uw0cXOsu+/DAACIpM2 In-Reply-To: Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3410522704_19931442" --B_3410522704_19931442 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable I=B9m just wondering if it=B9s as easy as having BasicHttpFetcher transfer the HttpRequest params to the httpMethod params. Was it an oversight or were they not copied for a reason? doug On 1/27/12 2:23 PM, "daviesd" wrote: > Back in December Li Xu helped me get a patch submitted that added the > OAuth2RequestParameterGenerator interface. It is meant to be implemented= if > you want to pass additional parameters along to the various oauth2 flow > requests. >=20 > I=B9ve since noticed an issue with this. The parameters I add get passed a= long > fine to a CodeGrantTypeHandler (when asking for the auth code). However,= when > the access token is requested using the StandardAuthenticationHandler, th= e > parameters I generate do not get passed along the subsequent > BasicHttpFetcher.fetch. I think probably because this is a POST and it > doesn=B9t pass parameters sent in the HttpRequest object. It assumes only > header values? Is this correct or a bug? Should I be passing my additio= nal > parameters along in the header in this case? If so, I probably need to s= upply > a patch for StandardAuthenticationHandler that adds the params to the hea= der > in addition. >=20 > request.setHeader(OAuth2Message.CLIENT_ID, clientId); > request.setParam(OAuth2Message.CLIENT_ID, clientId); > request.setHeader(OAuth2Message.CLIENT_SECRET, secret); > request.setParam(OAuth2Message.CLIENT_SECRET, secret); >=20 > // add any additional parameters > for (Map.Entry entry : > accessor.getAdditionalRequestParams().entrySet()) { > request.setParam(entry.getKey(), entry.getValue()); > } >=20 > doug --B_3410522704_19931442--