Package alluxio.security.authentication
Class ClientIpAddressInjector
- java.lang.Object
-
- alluxio.security.authentication.ClientIpAddressInjector
-
- All Implemented Interfaces:
io.grpc.ServerInterceptor
public class ClientIpAddressInjector extends java.lang.Object implements io.grpc.ServerInterceptor
Server side interceptor that is used to put remote client's IP Address to thread local storage.
-
-
Constructor Summary
Constructors Constructor Description ClientIpAddressInjector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getIpAddress()
<ReqT,RespT>
io.grpc.ServerCall.Listener<ReqT>interceptCall(io.grpc.ServerCall<ReqT,RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT,RespT> next)
-
-
-
Method Detail
-
getIpAddress
public static java.lang.String getIpAddress()
- Returns:
- IP address of the gRPC client that is making the call
-
interceptCall
public <ReqT,RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT,RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT,RespT> next)
- Specified by:
interceptCall
in interfaceio.grpc.ServerInterceptor
-
-