You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
438 B
16 lines
438 B
package startrpc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/openimsdk/open-im-server/v3/pkg/authverify"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
func grpcServerIMAdminUserID(imAdminUserID []string) grpc.ServerOption {
|
|
return grpc.ChainUnaryInterceptor(func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error) {
|
|
ctx = authverify.WithIMAdminUserIDs(ctx, imAdminUserID)
|
|
return handler(ctx, req)
|
|
})
|
|
}
|