Why does my ROC util fail with "Failed to decode basic authentication token" ?

Question

My client credentials succeeded in the API call 

POST https://na03.reltio.com/oauth/token?grant_type=client_credentials

It failed in the ROCS utility with

 

 

Answer

 

The tool expected the following format for the property:

CLIENT_CREDENTIALS=<Base64 encoded client_id:client_secret>

Internally, ROCS constructed the authorization header as:

Authorization: Basic <CLIENT_CREDENTIALS> 

The ROCS code automatically prepended the Authorization: Basic header when invoking the OAuth endpoint.

However, if the CLIENT_CREDENTIALS value had already included the "Basic " prefix (e.g., Basic <base64 string>), the resulting header became:

Authorization: Basic Basic <base64 string>

This led to a malformed header, which caused the error observed in the logs:

"error_description": "Failed to decode basic authentication token" 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.