×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to obtain OTDS token when using SSO ?

How to obtain OTDS token when using SSO ?

How to obtain OTDS token when using SSO ?

(OP)
I would like to get an OTDS token so I can call the integration widgets for the user that's issueing the request.
We have Content Server configured for SSO using OTDS; so how can I get an OTDS ticket for the current user using the REST API ?

RE: How to obtain OTDS token when using SSO ?

(OP)
My cs directory on the frontend is set to Windows Authentication.

RE: How to obtain OTDS token when using SSO ?

Then probably the way is to basically try to hit a livelink page like a custom view/appearance this would give you the Livelink Cookie/OTDS Cookie . Livelink's REST API will not accept a cookie by design because of security loop holes,hence it is mandatory to supply a Web Header before calling it.This snippet that I am posting actually is inside an appearance I use it to repaint a menu don't worry about the details but look at the colored invocation that's how a REST API call should be formulated.

So for what its worth look at this snippet

Theoretically in regular livelink if you want to play with REST Code the Livelink webserver has to be anonymous meaning on first login you have to supply a userid/password
May not work in your IWA as I don't have a IWA based system now but at least you should know that the headers is what is important.

CODE -->

<script>

$(document).ready(function() {
	
	$.ajax({
		method: "GET",
		url: baseURL + "/api/v1/auth",
		headers: {
			"OTCSTicket": getCookie("LLCookie")
		},
		success: function( data ) {
			var userData = data.data;      //if the REST API is successful look for the JSON Response from the Server using Dev Tools
			var first_name =userData.first_name
			var last_name =userData.last_name
                        alert("Hi Ya you Dawg..."+ first_name+last_name);     

			
		}, error: function(response, textStatus, errorThrown) {
			var message = "[" + response.status + "] " + errorThrown;
			console.error("Error calling auth for user: " + message + "\n" + response.responseText);
		}
	});
});

function getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}

</script> 

In essence what you see is I am just using the getCookie to do it and set a alert in that page(OTVar has already things you can look for I am just showing you a successful REST API call:))



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

RE: How to obtain OTDS token when using SSO ?

(OP)
Thanks for that; that part seems to work.
Now how can I use that token to call the Integration Widget ?

Regards,
Ruud

RE: How to obtain OTDS token when using SSO ?


If the Integration Widget takes the form of LLURL/RESTAPICALL then what the above code shows is


baseURL/api/v1/

any command in this command set should work
https://developer.opentext.com/webaccess/#url=%2Fa...

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair
http://www.livelink.in

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close