The services tracks no connection/client state what so ever. This is what makes it easy to update/restart services without disruption, and opens up for full horizontal scaling (maybe not for Wolfery, due to the service architecture I choose. But for other Resgate based projects, it can be used to scale near endlessly).
The gateway, however, keeps state of all connections. It stores things like tokens (retrieved after a successful auth
call for that connection), and which resources are currently being subscribed by each connection. However, once a connection is closed, the gateway will instantly drop all state for that connection.
If you do an auth
call, it is only that single connection that gets authenticated.
For HTTP requests, the auth
call is made transparently by Resgate, using the HTTP headers.