Author |
Message
|
anuj.garg |
Posted: Tue Sep 13, 2016 2:59 am Post subject: Basic Authentication in HTTP Request node |
|
|
Newbie
Joined: 12 Sep 2016 Posts: 3
|
I want to hit a web service url which is basic authentication enabled so i put http request node nd a compute node before it putting
SET OutRoot.HTTPRequestHeader."Authorization"='Basic . . .';
but its terminating at http request node so can anyone help me. i can do all this thing in a simple http call directly. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Sep 13, 2016 4:02 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Can a Moderator please move this thread to the Broker forum.
What have you tried to do? What failed and why?
Please don't expect us to do your job for you. We are here to help you and not to do your job for you. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 13, 2016 4:37 am Post subject: Re: Basic Authentication in HTTP Request node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anuj.garg wrote: |
I want to hit a web service url which is basic authentication enabled so i put http request node nd a compute node before it putting
SET OutRoot.HTTPRequestHeader."Authorization"='Basic . . .'; |
What about the rest of the things you need to do to get IIB to do BasicAuth for you? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vishBroker |
Posted: Tue Sep 13, 2016 5:22 am Post subject: |
|
|
Centurion
Joined: 08 Dec 2010 Posts: 135
|
'Base64 encoding' - something you should look into.
Here is hint
Quote: |
SET OutputRoot.HTTPRequestHeader."Authorization" = 'Basic '||base64Encode(CAST('admin:admin123' as BLOB CCSID InputRoot.Properties.CodedCharSetId)); |
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 13, 2016 5:27 am Post subject: Re: Basic Authentication in HTTP Request node |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
What about the rest of the things you need to do to get IIB to do BasicAuth for you? |
By "webservice" you mean "SOAP provider"? Then you should be using SoapRequest, not HTTPRequest.
If you mean "REST request", then you should be using an HTTPRequest node, and configuring the necessary security policies/etc. to have IIB handle the basic auth for you.
Where are you going to store the password? in plaintext in your code? in a "properties file"? In a User Defined Parameter, that can be changed when you redeploy or at runtime? Again, where are you going to *store* the password so you can get it to change the runtime to use the new one? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|