-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
权限验证怎么做? #18
Comments
GatewayClient 和 GatewayWorker是在一个内网里使用,start_gateway.php里$gateway->lanIp设置成内网ip,register服务监听内网ip即可。 |
这个我知道,但问题是内网也是有不同的业务划分的,也不是在同一个内网就有权。 甚至更复杂的是,同一个gateway跑多个业务,不同的client只能给各自的业务发消息。 |
Gateway和GatewayClient支持设置secretKey,secretKey类似密码的作用,用法是 $gateway->secretKey='yourpassword'; $worker->secretKey='yourpassword'; $register->secretKey='yourpassword'; GatewayClient调用前设置secretKey类似如下 Gateway::$secretKey='yourpassword'; 保证所有地方secretKey都设置一致,这样外部没有正确的secretKey时就无法调用了。 |
看例子随便一个client设置一下$registerAddress,就可以给所有客户端发消息了,那样就避免不了一些“非法”client“乱”发消息。
如果在其它客户端做消息签名校验之类好像又不太好,有没办法在服务端设置校验?只有校验通过的client消息才能发给其它客户端?
The text was updated successfully, but these errors were encountered: