mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 05:12:17 +00:00
@ -7,6 +7,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import kotlinx.coroutines.asExecutor
|
import kotlinx.coroutines.asExecutor
|
||||||
|
import kritor.auth.AuthInterceptor
|
||||||
import kritor.service.*
|
import kritor.service.*
|
||||||
import moe.fuqiuluo.shamrock.helper.LogCenter
|
import moe.fuqiuluo.shamrock.helper.LogCenter
|
||||||
import kotlin.coroutines.CoroutineContext
|
import kotlin.coroutines.CoroutineContext
|
||||||
@ -16,6 +17,7 @@ class KritorServer(
|
|||||||
): CoroutineScope {
|
): CoroutineScope {
|
||||||
private val server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create())
|
private val server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.create())
|
||||||
.executor(Dispatchers.IO.asExecutor())
|
.executor(Dispatchers.IO.asExecutor())
|
||||||
|
.intercept(AuthInterceptor)
|
||||||
.addService(Authentication)
|
.addService(Authentication)
|
||||||
.addService(ContactService)
|
.addService(ContactService)
|
||||||
.build()!!
|
.build()!!
|
||||||
|
Reference in New Issue
Block a user