Forum Discussion

ChrisRiddell's avatar
ChrisRiddell
Regular Visitor
6 years ago

SoapUI How to add OAuth2 Credentials as Basic Header for ClientCredentials Grant Flow

Hi,

 

I'm setting up a REST API call, using OAuth2.0 for authentication. The ClientIdentification and ClientSecret I add are always added to the query string. Here's what I see in my http log:

 

"POST /auth/web/token HTTP/1.1[\r][\n]"

"Content-Type: application/x-www-form-urlencoded[\r][\n]"

"Content-Length: 72[\r][\n]"

"Host: 10.255.12.98:9000[\r][\n]"

"Connection: Keep-Alive[\r][\n]"

"User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"

"[\r][\n]"

"grant_type=client_credentials&client_secret=password&client_id=123456789"

However, our authentication server is expecting the client secret and client id to be sent in the Basic authentication header. Is there any way I can configure SoapUI to do that? I haven't been able to find one so far.

 

Thanks.

No RepliesBe the first to reply