FatmanUK / webapp

The standard Go http tutorial taken to ludicrous extremes
0 stars 0 forks source link

Expire sessions #26

Closed FatmanUK closed 5 months ago

FatmanUK commented 5 months ago

Could use a Callwheel.

FatmanUK commented 5 months ago

Timeout and expiry? Expiry is fixed, timeout is shorter but extends with each access.

athajaerel commented 5 months ago

Already works on the client side --- the browser correctly doesn't send expired cookies. For the server side --- need a timeout thread per timeout per session? If either times out, delete the session token. View and login routes need to start threads to timeout the session token. One thread needs to be restartable (or kill-and-create-able) by any route.