Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

Hi Max,

Are you trying connect the service in my project, right?

Thank you very much!

I ́m competing for a job in my city....so... i ́m depending of this app show the list of the services - I have less than one week...

If you want modified all this app..no problem....I only creaed the first service...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

OK, I updated your app and it now saves the token into Local Storage. You can see it in complete event for the service.

code
var token = jqXHR.getResponseHeader('X-Access-Token');
localStorage.setItem('token', token);

// to read value use:
// localStorage.getItem('token');
/code

For the service to work, you need to launch Chrome with security disabled: http://blog.tiggzi.com/2012/03/rest-s.... Tiggzi proxy doesn't seem to return the headers you need - might be a bug.

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

HI Max,

The "var token" didn ́t save my " X-Access-Token" - Saved null

-------------------------------------------------------------

The command :
alert(jqXHR.getAllResponseHeaders());

Show:

Content-Language: en-US,en;q=0.8
Cache-Control: max-age=3600
Content-Type: application/json; charset=utf-8
Expires: Sat, 17 Mar 2012 20:25:57 GMT

-----------------------------------------------------------------

The command :
Tiggr('out').text(jqXHR.getResponseHeader('X-Access-Token'));

Show:
null

-----------------------------------------------------------------

I ́m trying in chrome
C:\Users\YOUR_USER\AppData\Local\Google\Chrome\Application\chrome.exe
--allow-file-access-from-files --disable-web-security

I have disabled the tiggzi proxy.

What am I doing wrong??????

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

Make sure you close all Chrome windows before you launch with security disabled.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

I just launched your app, and saw that you are able to print the token.

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

WORKED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you Max!!!!!!!!!!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

Glad it's working!

Michael Klauss
Posts: 0
Joined: Thu Mar 15, 2012 3:55 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

Hi Max,

I am creating a mobile app, right?

So, i want to create a website project in tiggzi equal my mobile project.

I need to create a new project and re-create all?

Or can i to redirect my domain to link my mobile project?

Can i copy my mobile project to website project?

"Tiggzi proxy doesn't seem to return the headers you need - might be a bug."

I only can test my project on Chrome with security disabled.

I need this problem resolved to show my project in a website project too.

Thank you!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

ADVANCED AUTHENTICATION FOR REST SERVICE

Tiggzi Mobile App Builder creates mobile apps, it doesn't create regular web sites.

Our proxy is a bonus feature and only works when you test a mobile web app or host the app with us (on tiggzi.net or custom domain).

If you export the app and host it somewhere else, the proxy wont be used.

If you export the app as PhoneGap app, then you don't need the proxy at all.

You should configure your server to support JSONP or CORS.

More information:
http://blog.tiggzi.com/2012/03/rest-s...

Return to “Issues”