summaryrefslogtreecommitdiffstats
path: root/crates/auth-service/src/server/grpc/interceptor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/auth-service/src/server/grpc/interceptor.rs')
-rw-r--r--crates/auth-service/src/server/grpc/interceptor.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/auth-service/src/server/grpc/interceptor.rs b/crates/auth-service/src/server/grpc/interceptor.rs
new file mode 100644
index 0000000..155a306
--- /dev/null
+++ b/crates/auth-service/src/server/grpc/interceptor.rs
@@ -0,0 +1,17 @@
+use tonic::{
+ Status,
+ service::{Interceptor, interceptor::InterceptedService},
+ transport::Channel,
+};
+use tracing::Span;
+
+pub type Intercepted = InterceptedService<Channel, MyInterceptor>;
+
+#[derive(Clone, Copy)]
+pub struct MyInterceptor;
+
+impl Interceptor for MyInterceptor {
+ fn call(&mut self, request: tonic::Request<()>) -> Result<tonic::Request<()>, Status> {
+ Ok(request)
+ }
+}