You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cgsk <ka...@gmail.com> on 2013/03/20 13:37:04 UTC

HTTP Basic Authentication

Hi There,

I am using Jetty endpoint exposed which invokes a external service using
HTTP component and the external service requires a Basic Auth. So I am
passing the query parameters as below:

bridgeEndpoint=true&authMethod=Basic&throwExceptionOnFailure=false&authUsername=username&authPassword=authPassword

It works fine in Firefox, but when invoked using Chrome, it discards the
Basic auth params and it does a retry again with Basic Auth params added in
the retry call. Any idea about why there is difference in Chrome compared to
Firefox? Do we need add any additional param in camel http call to handle
this?



--
View this message in context: http://camel.465427.n5.nabble.com/HTTP-Basic-Authentication-tp5729500.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: HTTP Basic Authentication

Posted by cgsk <ka...@gmail.com>.
Thanks for the reply. The problem got resolved after adding
httpClient.authenticationPreemptive=true



--
View this message in context: http://camel.465427.n5.nabble.com/HTTP-Basic-Authentication-tp5729500p5729680.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: HTTP Basic Authentication

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Not sure if you can configure the http client to follow redirects,
that may allow the http client
to detect the redirect and provide the credentials for basic auth
after the redirect.



On Wed, Mar 20, 2013 at 1:37 PM, cgsk <ka...@gmail.com> wrote:
> Hi There,
>
> I am using Jetty endpoint exposed which invokes a external service using
> HTTP component and the external service requires a Basic Auth. So I am
> passing the query parameters as below:
>
> bridgeEndpoint=true&authMethod=Basic&throwExceptionOnFailure=false&authUsername=username&authPassword=authPassword
>
> It works fine in Firefox, but when invoked using Chrome, it discards the
> Basic auth params and it does a retry again with Basic Auth params added in
> the retry call. Any idea about why there is difference in Chrome compared to
> Firefox? Do we need add any additional param in camel http call to handle
> this?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/HTTP-Basic-Authentication-tp5729500.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen