Hi All,
I am using REST, TLS, JSON, & OAUTH to do a 2 part process to send new hire data to our payroll processor.
The first step is to contact their token server passing client ID and client Secret to get a token that has to be passed in the 2nd step. The
client ID and client Secret are basically userid and password. I use http_setAuth(HTTP_AUTH_BASIC : %trim(clientID) : %trim(clientSecret)). This is working fine. I get back the token successfully.
My problem is in the 2nd step. I use
http_xproc( HTTP_POINT_ADDL_HEADER
:
%paddr(Additional_Security_Header)
)
to add a header: “Authorization: Bearer authtoken” where authtoken is the token returned from step 1. While I am getting the additional header as desired, I’m also getting
a basic authorization header in front of it as though I had called the http_setAuth() with the same parameters as in step 1.
I tried using http_persist_close(pComm) at the end of step 1, thinking that the connection is remaining open but it doesn’t seem
to make any difference. Is there something I need to do to close the connection at the end of step 1 or a way to suppress the “Authorization Basic:
endcoded client credentials” header in step 2? Thanks in advance. CFI
Dan Stephens Systems Engineer Analyst Principal 4701 E. 32nd St. Joplin, MO 64804 USA P: 417-623-5229 ext. 5462 M: 310-612-9847 |
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi