Class AuthenticatedUserInjector

  • All Implemented Interfaces:
    io.grpc.ServerInterceptor

    @ThreadSafe
    public final class AuthenticatedUserInjector
    extends java.lang.Object
    implements io.grpc.ServerInterceptor
    Server side interceptor for setting authenticated user in AuthenticatedClientUser. This interceptor requires ChannelIdInjector to have injected the channel id from which the particular RPC is being made.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <ReqT,​RespT>
      io.grpc.ServerCall.Listener<ReqT>
      interceptCall​(io.grpc.ServerCall<ReqT,​RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT,​RespT> next)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AuthenticatedUserInjector

        public AuthenticatedUserInjector​(AuthenticationServer authenticationServer)
        Creates AuthenticationServer with given authentication server.
        Parameters:
        authenticationServer - the authentication server
    • Method Detail

      • 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 interface io.grpc.ServerInterceptor