Way to define Interceptors or Middlewares for OAuth?
lrembacz opened this issue · comments
lukerem commented
Hi,
Is there a way or is planned to define some kind of Interceptors or Middlewares for this gRpc server?
Something like in this post would be great I guess:
Anton Tsitou commented
Yes, you can define Interceptor by implementing InvokerInterface:
https://github.com/spiral/php-grpc/blob/master/src/InvokerInterface.php
And pass it the server: https://github.com/spiral/php-grpc/blob/master/src/Server.php#L33
You can wrap default Invoker to implement needed functionality.
lukerem commented
Yes, I can see that.
Thank you for your answer and this work.