Start a new topic

set http request headers on loadARchitectWorld

set http request headers on loadARchitectWorld


Hi,

our architect world runs behind a proxy that requires an authorization token.

After obtaining the token can be send via request.headers.authorization (preferred) or cookie.token

Is there any way to set or pass http request headers when calling plugin.loadARchitectWorld()

 

Thank you in advance,

 

Pascal

 

 

Hi Pascal,
The Wikitude SDK or any extension currently don't support request headers. Would it be an option to first load a different web page and then, after the authorization is done, load the Architect World? You can load any other web page with the Wikitude SDK. It is not required to do any Architect related calls in JS.

Best regards

Andreas

 

Hi Andreas,

thanks for your response.

I will try your option or try to set a "cordova global cookie" (which the plugin should use?)

 

Bests, 

Pascal

 

Hi Pascal,
I haven't written any specific code to pick up 'global cordova cookies', so I don't know if it works.

Best regards

Andreas

I had success using https://github.com/kristianhristov/cordova-cookie-master.

After authenticating and retrieving a token I was able toset the token as a cookie.

After that wikitudePlugin.loadARchitectWorld() picked up that cookie and the ar world was loaded witthout the need for any manual user authentication.

So problem solved!

 

Thanks,

Pascal

Hi Pascal,
THX for sharing your solution! Hopefully someone else can use it as well.

Best regards

Andreas
Login or Signup to post a comment