cancel
Showing results for 
Search instead for 
Did you mean: 

Using RESTful logon token in OpenDocuments URL

Former Member
0 Kudos

Is there a way to use the logon token created through the RESTful call to pass the username/password to openDocuments URL?

This is what I have

var token = encodeURI(this.xSAPLoginToken);

var url = gui.data.Constants.BOE_REPORT_URL + '/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=' + cuid + '&sIDType=CUID&token='+token;

window.open(url);

I've tried not encoding the token and using encodeURI and encodeURIComponent.  None of what have worked.

Is there a proper way to for the URL

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor
0 Kudos

Hi Tanya,

What's the behavior of it not working?  do you end up with a logon page or an error?  If you get a logon page, then it could be a problem with passing the token, but your code above looks fine.  If you get an error, then there's probably something wrong with the URL.

You could try writing the URL out and then copy/paste into a new browser.

Dan

Former Member
0 Kudos

I'm getting the logon page.  So it's not logging the user in automatically.  No errors.  URL ends up looking like this:

<servername>:<port>/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=AVR6XNxE7oVFqhEgYeOeYSk&sIDType=CUID&token=%22<servername>:<port>@%7B3&2=10037595,U3&p=42235.5597255208,Y7&4F=7265,U3&63=secEnterprise,0P&66=60,03&68=secEnterprise:<username>,0P&qe=100,U3&vz=hg5pX1qog_D2rLskxKrR4gwTKXy_MEIZqSYTjkgcu5M,UP%7D%22

daniel_paulsen
Active Contributor
0 Kudos

I believe the problem is the %22 on either side of the token.  remove the quotes when using openDocument.

Dan

mike_howles4
Active Contributor
0 Kudos

Stripping the quotes worked for me.

Answers (1)

Answers (1)

former_member772107
Discoverer
0 Kudos

Latest educational news and result updates for all institutes.