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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <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)
    服务端拦截器

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface io.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 interface io.grpc.ClientInterceptor