IBM Support

webMethods Knowlegebase : pub.client:http sends invalid Authorization header when using token (1775098)

Troubleshooting


Problem

Using built-in service pub.client:http with auth/type='Bearer' and a token, sends an incorrect HTTP Authorization header.

If the auth/type=Bearer and the auth/token=111111 then the HTTP Authorization header sent is:

Authorization: Basic YmVhcmVyOjExMTExMQ==

It should be :

Authorization: Bearer 111111

The schema "Basic" is used instead of "Bearer" and the value is a base64 encoding of the words "bearer:token"

This happens at version 9.7, 9.8 & 9.9 (not 9.10 or higher).

To recreate the issue:

Run pub.client:http with inputs:

url = http://localhost:9876/something

method=get

data/string=test

auth/type=Bearer

auth/token=111111

The resulting HTTP call contains

GET /something?test HTTP/1.1

User-Agent: Mozilla/4.0 [en] (WinNT; I)

Accept: image/gif, */*

Host: localhost:9876

Authorization: Basic YmVhcmVyOjExMTExMQ==

Content-Type: application/x-www-form-urlencoded

(in this case "YmVhcmVyOjExMTExMQ==" is a base64 encoded value of "bearer:111111")

Document Location

Worldwide

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSVYEV","label":"IBM webMethods Integration"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Integration Server (PIE)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2008"}],"Version":"9.7"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSFIWYE","label":"IBM webMethods B2B"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Integration Server (PIE)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2008"}],"Version":"9.7"},{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSQG2X","label":"IBM webMethods Managed File Transfer"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods Integration Server (PIE)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2008"}],"Version":"9.7"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17222178