How to pass NTLM Authentication to an AJAX call with REST API
When posting a document to CS with REST API, how can I pass NTLM authentication to REST when making an ajax call for users?
For testing we're using 'admin' username/password to handle the authentication (see example below) and post documents, ideally we would like to use the current user's credentials to handle the authentication call.
Please note not using AppWorks, this is mainly for a html page within content server, nor do we use OTDS instead we use CSDS.
function authenticate() {
$.ajax({ type: "POST", url: baseApiURL + "/v1/auth", data: { username: "Admin", password: "Password" } }).done(function(data) { otcsTicket = data.ticket; }).fail(function(request, statusText, statusMessage) { // ...failed });
};
Many thanks,
Alban
Comments
-
CS REST API does not provide NTLM Authentication. The portal, where you host your page is supposed to authenticate the user and pass the ticket to the REST API. Will your code run an a CS page (request handler) generated by WebLingo?
0 -
Thanks for you reply, I've realized the API call was ignoring the username and password, so the NTLM authentication is fine.
However, some users login with their username and pass in a standard way and I cant authenticate without requesting another username and password.
Please note this code is within a webreport on CS10 so I would like to use the same credentials.0 -
If you have a webreport, which produces HTML output and includes a JavaScript code there, you can generate the OTCSTicket for the CS REST API communication there.
0 -
Thanks for your help Ferdinand.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 151 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories