resgateio / resgate

A Realtime API Gateway used with NATS to build REST, real time, and RPC APIs, where all your clients are synchronized seamlessly.
https://resgate.io
MIT License
685 stars 67 forks source link

Reaccess on system.reset #6

Closed jirenius closed 6 years ago

jirenius commented 6 years ago

Issue

When a system.reset event is received, the gateway will currently just reload the data, but will assume previous access requests to still be valid.

Suggested solution 1

Reaccess events should be created for each resource affected by the system.reset event, forcing each subscription to check with the service if it still has access.

Suggested solution 2

A separate event, system.reaccess, should be supported. The event should work in a similar way as system.reset, but would trigger reaccess instead of reloading.

Suggested solution 3

Another property, access, should be added to the system.reset event, which would be similar to the resources property, but for triggering reaccess.

jirenius commented 6 years ago

Used Suggested solution 3 Fixed in https://github.com/jirenius/resgate/pull/16