Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 97586 invoked from network); 9 Sep 2010 17:27:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 17:27:42 -0000 Received: (qmail 59785 invoked by uid 500); 9 Sep 2010 17:27:42 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 59687 invoked by uid 500); 9 Sep 2010 17:27:42 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 59679 invoked by uid 99); 9 Sep 2010 17:27:41 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 17:27:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tmnichols@gmail.com designates 74.125.83.51 as permitted sender) Received: from [74.125.83.51] (HELO mail-gw0-f51.google.com) (74.125.83.51) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 17:27:20 +0000 Received: by gwj15 with SMTP id 15so949388gwj.10 for ; Thu, 09 Sep 2010 10:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=rBwyasDYbKTvlhfM2SEyc2etPIM7Ev0r+VKvWTwRSwo=; b=q6nMiZLe27vjLoM7OPnRGVdXeHgtR5VBTvq8r39LLV42RAbsfS5ATXMBCBmBW8JM6Y w8RIYuokFFPmnwAIoBhgxKC7hjzndxRFr5lhG5ZnzhnYWxO7o5DP5sdDU9VnUhdPpn1o TcUJuqKU9JLgXWfycEfF/cpIJYtimJrtb+wBo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=x6Pl84ocuKIqZoJeL1e3cc94glkhG0IflaYdEEl2yquRoQNcfFFoDro3VSrLHY77R6 aRqZf6mpS4lR6rbw1sJoQuAOAgptVGCuJq57Jq2YrpL9l/2Ee2G+69UMBSMQ3uXiKcMZ QFiJAqGRtAVl5+Nx/FUKiRz8BD+O+1byuWzzA= MIME-Version: 1.0 Received: by 10.204.67.138 with SMTP id r10mr2012357bki.103.1284053218348; Thu, 09 Sep 2010 10:26:58 -0700 (PDT) Received: by 10.204.69.212 with HTTP; Thu, 9 Sep 2010 10:26:58 -0700 (PDT) In-Reply-To: References: Date: Thu, 9 Sep 2010 13:26:58 -0400 Message-ID: Subject: Re: AuthScheme impl for OAuth From: Thom Nichols To: dev Content-Type: multipart/alternative; boundary=001636c9236df3d150048fd6efd0 X-Virus-Checked: Checked by ClamAV on apache.org --001636c9236df3d150048fd6efd0 Content-Type: text/plain; charset=ISO-8859-1 So I'm trying to implement an AuthScheme for OAuth (actually I'm trying to augment SignPost to work with HttpClient's AuthScheme, but anyway...) The problem I'm running up against is when AuthScheme.authenticate( Credentials, HttpRequest ) is called. The problem is, in order for the request to be signed in OAuth, I need to know the entire request URI. The HttpRequest that's passed into authenticate() only has the path portion of the URI. Code snippet from OAuthScheme.java: public Header authenticate( Credentials credentials, HttpRequest request ) throws AuthenticationException { System.out.println( "AuthScheme request: " + request.getURI() ); // ... sign the request } So, calling getURI on my original request shows: http://twitter.com/statuses/update.xml (get 401 response, authScheme handler kicks in...) from the authenicate method, I get printed: AuthScheme request: /statuses/update.xml I'm guessing this is because the request I'm getting is the 'new' request created after the initial 401 response is returned. I know the HttpContext holds state information between multiple requests (like redirects and 401s) but I don't have access to that from my AuthScheme instance. So how can my AuthScheme get the URI from the original request? Thanks! -Tom --001636c9236df3d150048fd6efd0--