Because my application has a microservice architecture, this means there is another app storing the token in the database and the only thing my web2py front end does is make a http request to that microservice and format the received data, but if during that formatting some exception is raised I lost all the content (in this case the token) that I want to send in request.cookies, this mean the user still have the old token when the microservice already have changed that token in their database.
El sáb., oct. 1, 2016 9:40 PM, Anthony <[email protected]> escribió: > On Saturday, October 1, 2016 at 4:19:59 PM UTC-4, Luis Valladares wrote: > > They expire, when I generate a new token I store it in the database and > send to the user browser, each time the token is expired I generate a new > one, overwrite the token in the database (and because this the other token > is lost) and sent to the user. > > > I'm not sure I understand. Every HTTP request is wrapped in a database > transaction, so if an error occurs during a request, any database > operations that had been made prior to the error will be rolled back before > returning the error response. So, how is it that your token overwriting is > not being rolled back upon error? > > > Anthony > > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/Dx52cLv-8-Y/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

