Questions? Feedback?powered byOlark live chat software

Standard Support

Bug 1667

REST services and windows authentication 12 October, 2018

Kennon Jones
20 September, 2018
Product: PowerBuilder Category: Other
Version: 2017 R3 Publishing: Public
Status: Transferring Priority: P3
Classification: Enhancement Resolution:
Mark Lee 12 October, 2018
Hi Kennon,

Thanks for you quick update!
I am sorry to inform you that we current don’t support the window NTLM and Negotiate provided in your service.
If you service supports Basic Authentication, you can work around the issue using the following code:
coderObject    luo_base64
luo_base64 = Create coderObject
lb_data = Blob(ls_user+":"+ls_pwd, EncodingUTF8!)
ls_Basic = luo_base64.base64encode( lb_data)
…
lnv_restclient.setrequestheader( 'Authorization', 'Basic ' + ls_Basic  )
lnv_restclient.
lnv_restclient.retrieve(dw_1,ls_url)
 
Anyway, thanks for reporting this problem and for your valuable suggestion.
We'll record it as a new requirement/enhancement request.
We'll transfer it to our product team for consideration.

Regards,
Mark Lee
Kennon Jones 11 October, 2018
Mark Lee,
OAuth does not help, we are using Windows authentication.
Mark Lee 10 October, 2018
Hi Kennon,

Please refer to the following link and see if it can resolve your problem.
https://www.appeon.com/support/documents/appeon_online_help/pb2017r3/powerscript_reference/ch10s520.html

Regards,
Mark Lee
Ken Guo 25 September, 2018
Hi Kennon,

I am sorry to inform you that at least there is no such plan in PB 2018. 
As to whether there will be such plan in the future, it depends on the results of a follow-up analysis from our product team. 

BTW, PB R3 now supports OAuth 2.0. Hope it is useful for you. See link below:
https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/204-oauth-new-feature-in-powerbuilder-2017-r3 

Regards,
Ken
Kennon Jones 21 September, 2018
Is it planned?
Ken Guo 21 September, 2018
Hi Kennon,

I’ve checked with our developers; The current RESTClient doesn’t have this feature. 

Regards,
Ken
Kennon Jones 20 September, 2018
testcase.sru (2KB)

Here is a simple test case: Instantiate the object, then call restclient_test(..) or httpclient_test(..), passing a URL to a webservice running on IIS with IWA (Integrated Windows Authentication) activated.
In our case this is Microsoft Dynamics running on our intranet.
Govinda Lopez 20 September, 2018
Hi Kennon,

PowerBuilder 2017 R3 now includes the OAuth2.0 functionalities. Is this what you are looking for? If so, you may find more info here: https://www.appeon.com/company/events/pb-2017-r3-new-features-rest-datawindow%E2%80%A6-json-oauth.html

If not, can you share with us a simple reproducible test case? That way we can better understand the problem.


Regards,
Kennon Jones 20 September, 2018
Using RESTClient object, issuing a Retrieve(...) fails when service host is using Windows authentication.
HTTP response header is:

HTTP/1.1 401 Unauthorized
Date: Thu, 20 Sep 2018 11:03:57 GMT
Content-Length: 49
Content-Type: text/plain
Server: Microsoft-IIS/10.0
WWW-Authenticate: NTLM
WWW-Authenticate: Negotiate
REQ_ID: 861e77e1-5394-40ba-b866-9d1c67343c3a
X-Powered-By: ASP.NET
OS:
Windows 10 
Platform:
64-bit 
Database Type:
 
Database Version: