You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create service that uses WebSockets, which means actual sessions. Upon connection, the client will have to do a handshake - declaring itself as either "Role A" or "Role B" by sending a login_a or login_b request (or maybe it'd be a parameter of the general login. I haven't decided yet). The login method, of course, will also send the parameters.
After which it'll be able to access the methods exposed to that role. Each role has different methods (though some can be shared, of course)
My question is about the rpc.discover method:
Should it always return all the methods, or should it only return the methods available to that role (and in the handshake phase - only the login methods)
If it's the former - how should I mark which methods are available for each role?
If it's the latter - what do I do with openrpc.json? Can I make several such files (openrpc-handshake.json, openrpc-role-a.json, openrpc-role-b.json)? Or should the openrpc.json just return all the methods?