From a528030cbb9fc566234422b4ee199ee6445eb1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E6=B1=A0?= Date: Sun, 10 Mar 2024 16:05:20 +0800 Subject: [PATCH] =?UTF-8?q?`Shamrock`:=20=E5=AE=9E=E7=8E=B0=E9=89=B4?= =?UTF-8?q?=E6=9D=83=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 白池 --- xposed/src/main/java/kritor/server/KritorServer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xposed/src/main/java/kritor/server/KritorServer.kt b/xposed/src/main/java/kritor/server/KritorServer.kt index b3b1cb9..376f80b 100644 --- a/xposed/src/main/java/kritor/server/KritorServer.kt +++ b/xposed/src/main/java/kritor/server/KritorServer.kt @@ -7,6 +7,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.asExecutor +import kritor.auth.AuthInterceptor import kritor.service.* import moe.fuqiuluo.shamrock.helper.LogCenter import kotlin.coroutines.CoroutineContext @@ -16,6 +17,7 @@ class KritorServer( ): CoroutineScope { private val server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create()) .executor(Dispatchers.IO.asExecutor()) + .intercept(AuthInterceptor) .addService(Authentication) .addService(ContactService) .build()!!