AnsweredAssumed Answered

Authorization with V11 when running widget from another server

Question asked by gfoster@jacada.com on Jan 24, 2016
Latest reply on Mar 24, 2016 by gfoster@jacada.com

I am relatively new to Finesse.

I am building a new Widget which resides on a separate server.

I took the SampleGadget demo from the Finesse web site and I have a problem with V 11.0 which I work with.

I added to the creation of User an error handler:

 

user = new finesse.restservices.User({

                id: id,

                onLoad : handleUserLoad,

                onChange : handleUserChange,

                onError: handleUserError

            });

 

And when I run, I receive the following error:

LearningSampleGadget : Handle User Error start concat:15999:17

LearningSampleGadget :    Error-Status:401 concat:15999:17

Error-content:...... This request requires HTTP authentication. .......

 

Seems as I miss Authentication.

Therefore I tried a few things:

- I checked the value of '_prefs.getString("authorization")' and it's empty. So I create it using 'finesse.gadget.Config.authorization = btoa(id + ":" + my_password);'. Still 401

- I also noticed that remoteHost points to localhost so I changed it to the Finesse host. Still 401

- I wanted to turn on the internal logs of finesse.js and I was not successful (any one knows how to do it?)

 

I appreciate any help.

Outcomes