hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: AuthScheme impl for OAuth
Date Mon, 13 Sep 2010 15:15:34 GMT
On Mon, 2010-09-13 at 09:03 -0400, Thom Nichols wrote:
> A follow-up question --
> 
> I'm not sure how to reconstruct the full request URI given the
> HttpURIRequest and HttpContext.  It appears the URI from the request itself
> always contains the path portion of the original request URI.  I can get the
> host & port from the ExecutionContext.HTTP_TARGET_HOST attribute in the
> HttpContext.  But how do I determine the URI scheme?
> 

HttpHost#getSchemeName() should give you the URI scheme of the original
request.


> I'm trying to integrate Signpost OAuth via an HttpRequestInterceptor in lieu
> of the same information in an AuthScheme callback.  But given that both the
> HttpRequest I'm given and the one that's contained in the HttpContext
> ExecutionContext.HTTP_REQUEST attribute both appear to contain the mutable
> HttpRequest copy rather than the original immutable one, I'm not sure how to
> get or reliably reconstruct the original request URI.
> 

The ExecutionContext#HTTP_TARGET_HOST and ExecutionContext#HTTP_REQUEST
attributes set in the context should be sufficient to construct the
absolute request URI.

Hope this helps.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message