Class GrpcJwtInterceptor
java.lang.Object
io.github.xezzon.zeroweb.common.grpc.GrpcJwtInterceptor
- All Implemented Interfaces:
io.grpc.ClientInterceptor
,io.grpc.ServerInterceptor
@GlobalServerInterceptor
@GlobalClientInterceptor
@Component
public class GrpcJwtInterceptor
extends Object
implements io.grpc.ServerInterceptor, io.grpc.ClientInterceptor
服务间调用传递认证信息
- Author:
- xezzon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ReqT,
RespT>
io.grpc.ClientCall<ReqT,RespT> interceptCall
(io.grpc.MethodDescriptor<ReqT, RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next) 客户端拦截器<ReqT,
RespT>
io.grpc.ServerCall.Listener<ReqT>interceptCall
(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata requestHeaders, io.grpc.ServerCallHandler<ReqT, RespT> next) 服务端拦截器
-
Constructor Details
-
GrpcJwtInterceptor
public GrpcJwtInterceptor()
-
-
Method Details
-
interceptCall
public <ReqT,RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata requestHeaders, io.grpc.ServerCallHandler<ReqT, RespT> next) 服务端拦截器- Specified by:
interceptCall
in interfaceio.grpc.ServerInterceptor
-
interceptCall
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> interceptCall(io.grpc.MethodDescriptor<ReqT, RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next) 客户端拦截器- Specified by:
interceptCall
in interfaceio.grpc.ClientInterceptor
-