Hello!

Im creating a website with a microservices architecture, and for 
authentication i'm using JWT token stored in the cookies, this tokens are 
automatically renewed each 5 minutes, the basic flow of this is:

1 My front end makes a request to a microservice
2 The microservice check if the token its expired
3 If its expired check if its the same stored in our database
4 If its the same generate a new token, and send it to the front end
4.1 If its not the same answer a Non-authorized response to the front end
5 My web2py front end will change the token cookie for the new one.

My problem happens if (by any problem) i get a ticket on web2py, when this 
happens the new cookie are not sended in the response, the user still 
storing the old token, and the next time it makes a petition the step 3 
isnt found and close the user session

So, bottom line: What i want to do is "flush" (Php like: 
http://php.net/manual/es/function.flush.php) the cookie to the browser and 
after that still managing the response (because i want to format the 
response, send to a view...)

Its important to say that the functionality of token renewal and request is 
stored in a module

Thanks a lot!

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to