Not able to connect to Content Server REST API using OTDS
Hello,
I am trying to configure Content Server UI Widgets but are not working with OTDS users, getting the error:
"Invalid username/password specified." although the authentication to Content Server UI is working fine with OTDS users.
I tried to connect directly to Content Server REST API auth method from a very simple Javascript code:
var credentials = { userName: "demo", password: "xxxx" }; $.post(urlCS + "/auth", credentials, function (response) { });
and I get the same error.
Any idea?
Thank you.
Comments
-
Do you use the login user name, with which the user is visible in the CS user administration?
0 -
The OTDSticket is needed to authenticate, can be got using OTDS REST API.
This topic gave me the clue: https://developer.opentext.com/webaccess/#url=/awd/forums/questions/10775891/sso+between+portal+and+cswidget+using+otds&tab=501And here is my code:
csui.onReady(function () { var urlOTDS = "http://OTDSserver/otdsws/rest/authentication/credentials"; var urlCS = "http://OTCSserver/OTCS/cs/api/v1"; // Principal call // getValorTicketCS() .then(createWidget) .fail(function (request) { alert(request.status, request.statusText, request.responseJSON); }); /////////////////// function getValorTicketCS() { return jQuery .ajax({ url: urlOTDS, method: 'POST', data: JSON.stringify({ "userName" : "user", "password" : "password" }), dataType: "json", contentType: 'application/json' }) .then(function (response) { return response.ticket; }); } function createWidget(ticket) { new csui.FolderBrowserWidget({ connection: { url: urlCS, supportPath: "/supportPath", authenticationHeaders: {OTDSTicket: ticket} }, start: { id: 2000 }, breadcrumb: { }, facetPanel: false, placeholder: "#browser" }).display(); } });
// ]]>
0 -
Yes, you can authenticate against the CS REST API using the OTDSTicket too. However, the OTDS integration module running on the CS should make it trasparent, so that you do nto need to know the OTDS URL too.
1
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 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