Hello,
Are you using the http component?
http://camel.apache.org/http.html
There is a section on authentication there.
Example:
from("http://examples.com/rest/hello?";
+ "authMethod=Basic"
+ "&authUsername=User"
+ "&authPassword=Password")
Hello,
I try to send request to a webservice with camel and i dont found how to set
httplogin and httppass with
POJO i can do this:
final String s = my_httpLogin+":"+my_httpPwd;
final byte[] authBytes = s.getBytes(StandardCharsets.UTF_8);
final String encoded = Base64.getEncoder().encodeToString
Please setup the option of httpClient.authenticationPreemptive to be true.
You can find more information here[1] by searching authenticationPreemptive.
[1]https://camel.apache.org/http
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http
The preemptive authentication with HTTPS does not seem to work with
"Camel-Http"
It works only with "camel-http4"
But I have a limitation on my container ( websphere application server 7.x )
so cannot use "camel-http4" - does anyone know if this should work with
"camel-http" ??
== here is my cam
Which version of Camel are you using?
Can you try the latest release Camel 2.13.2?
If I remember right, there is an issue of setting up the camel-cxfrs endpoint
interceptors which was fixed recently.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.co
Hello,
Sorry I was referring to the Java Interceptor code above mentioned which
works fine for CXF SOAP.
Cann't we make it for CXF-REST?
Thanks,
Sayed
--
View this message in context:
http://camel.465427.n5.nabble.com/HTTP-Basic-Authentication-tp5742229p5756392.html
Sent from the Camel - User
Hello,
Thanks a lot for the response.Will try and let you know.
please share a sample code snippet.
However the same code works for me at server side for CXF-SOAP so why not
for CXF-REST ?
Regards,
Sayed
--
View this message in context:
http://camel.465427.n5.nabble.com/HTTP-Basic-Authenti
The configuration only work for the client side, if you want to enable the HTTP
Basic Authentication on the server side, you need to setup the Jetty
ServletContextHandler for it.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jn
Hello,
Pls find below my query of CXF-RS with Basic authentication:
public void configure() throws Exception {
System.out.println("inside route");
Map properties = new HashMap();
AuthorizationPolicy authPolicy = new AuthorizationPolicy();
authPolicy.setAut
Hello Experts,
Pls share me the CXF-REST code reference to use the above Java
Authentication:
Not getting an idea how to include this BasicAuthAuthorizationInterceptor in
REST end point either in Spring or Java DSL:
Spring End point:
http://localhost:9090?resourceClasses=com.test.Service"/>
Jav
Hello,
I tried with the code shared ,seems working fine at server end for CXF-SOAP
as tested through SOAPUI tool.
Please share the code for CXF REST Service.
However I need a Java client to call the service.
Tried many options but gives me errors.
Please send me a sample Java main client to test
One thing should be point out, CXF uses Http URL Connector which is from JDK by
default.
If you are using CXF 2.7.x and enable the async http client setting, it will
use the Apache Http Client 4.x to send the request.
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://will
Rules of the game sets the other side - http server.
Two requests are always bad, whether it's on an external authentication
server, or proxy server.
It is necessary to send a file size of 1 MByte. Length of HTTP request is
about 1.3 MByte. Two queries will give 2.6 MByte.
Aleksey
--
View thi
les/client/ClientPreemptiveBasicAuthentication.java)
Regards,
Tom
-Original Message-
From: alexey-s [mailto:alex...@mail.ru]
Sent: Dienstag, 29. Oktober 2013 11:47
To: users@camel.apache.org
Subject: Re: HTTP Basic Authentication
You'll be surprised. CXF uses the same library Apache HttpCompone
You'll be surprised. CXF uses the same library Apache HttpComponents.
CXF client initially twice sends an HTTP request. The first request without
authorization. Second with authorization.
For a GET request such behavior is acceptable. For a POST request is very
bad.
Aleksey
--
View this messa
I just captured the http request and response and found some thing interesting.
When camel-http send the request to back end server which is protected with
HTTP Basic Authentication,
HttpClient sends a request without Authentication inform first, then it sends
the request with the Authenticatio
I did a quick test with the camel trunk ( I think it’s same with last camel
release 2.12.1), the HTTP Basic Authentication setting is work out of box.
from("direct:endpoint").to("http://localhost:8081?authMethod=Basic&authUsername=user1&authPassword=pwd”);
I think you need to double check if
Hi Christian,
I tried to use HTTP auth options:
.to("http://{{server}}:{{port}}/{{address}}?authMethod=Basic&authUsername={{user}}&authPassword={{password}}";)
But it fails again:
INFO - Basic authentication scheme selected
DEBUG - Took 1889 millis to send to:
Endpoint[http://172.24.40.110:598
Martin is using the http component, not the CXF component...
Did you checked [1]? You can set the auth options per endpoint.
[1] http://camel.apache.org/http.html
Best,
Christian
-
Software Integration Specialist
Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apac
Hi
I used a interceptor approach. The java code for interceptor is as follows
*package outotec.com.mes.bw.copper_recovery_perc;*
*import java.io.IOException;*
*import java.io.OutputStream;*
*import java.net.HttpURLConnection;*
*import java.util.Arrays;*
*import java.util.List;*
*import java.util.
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.
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 wrote:
> Hi There,
>
> I am using Jetty endpoint exposed which invoke
Please check out the CXF http client configuer[1], and add these in your
beans.xml
http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration";
xmlns:security="http://cxf
Hi,
You need to configure a bus object with https and inject it into your
cxfEndpoint.
Please check out the example below. For more details check out the bus
configuration section of your CXF documentation.
There is no need to explicitly inject the bus into the endpoint. The
presence of a bus o
24 matches
Mail list logo