Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Loko
Creator II
Creator II

[resolved] Basic HTTP authentication in a route

Hi
I need to call a HTTP server that requires basic authentication.
In my cHTTP component, I tried the inline method (that works well in a web browser) with URI "http://username:userpwd@site.com"
0683p000009MCyn.png
I also tried the camel method, that is, set " http://site.com" in URI and set "authUsername" and "authPassword" in Advanced Settings
0683p000009MCys.png
But in both cases I get a 401 error from the server. 
Thanks for any help.
Loko
Labels (2)
1 Solution

Accepted Solutions
Loko
Creator II
Creator II
Author

Thank you Sabrina, it works , I was missing "authMethod" (I thought it would default to "Basic") and put all this in basic setting instead of advanced.
Before closing this thread, could you please tell me when to put some Camel parameter in "basic view" of a component, and when in "advanced settings" ?

View solution in original post

6 Replies
Anonymous
Not applicable

Hi Loko,
Could you please indicate what's build version you are using?
Best regards
Sabrina
Loko
Creator II
Creator II
Author

Hi Sabrina
Yes, we use Talend Open Studio 6.3.0
0683p000009MCtP.png
Anonymous
Not applicable

Hi
There are several ways to set user/pwd basic auth for cHttp component.
1) add "authMethod","authUsername", "authPassword" into Parameters (from Basic setting view)
2) add http header "Authorization" into Headers (from Advanced setting view)
For details please find http://camel.apache.org/http.html
If still no luck, you can try using "cCXFRS" component with "Use Authentication" -> "Http Basic"
Regards.
Loko
Creator II
Creator II
Author

Thank you Sabrina, it works , I was missing "authMethod" (I thought it would default to "Basic") and put all this in basic setting instead of advanced.
Before closing this thread, could you please tell me when to put some Camel parameter in "basic view" of a component, and when in "advanced settings" ?
Anonymous
Not applicable

It depends, for certain camel component. In case of cHttp component, the Basic setting view is for camel parameter, the Advanced setting view is for HTTP header. if you want to set a HTTP header but camel parameters not covered, you should use the Advanced view.
Regards
Xilai
Loko
Creator II
Creator II
Author

Thank you Xilai