Class ConnectorApiKeyInterceptor
java.lang.Object
ai.pipestream.connector.ConnectorApiKeyInterceptor
- All Implemented Interfaces:
io.grpc.ServerInterceptor
@ApplicationScoped
public class ConnectorApiKeyInterceptor
extends Object
implements io.grpc.ServerInterceptor
Captures the
x-api-key and x-datasource-id gRPC metadata headers
into the call Context, where handlers read them via
ConnectorApiKeyContext.apiKey() / ConnectorApiKeyContext.datasourceId().
Shared replacement for the per-connector api-key interceptors. Registered as a
GlobalInterceptor so it applies to every gRPC service in the consuming
connector automatically — and as an extension bean, with no
quarkus.index-dependency config needed.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ReqT,RespT>
io.grpc.ServerCall.Listener<ReqT> interceptCall(io.grpc.ServerCall<ReqT, RespT> call, io.grpc.Metadata headers, io.grpc.ServerCallHandler<ReqT, RespT> next)
-
Field Details
-
API_KEY_HEADER
Header carrying the datasource API key. -
DATASOURCE_ID_HEADER
Header carrying the datasource id.
-
-
Constructor Details
-
ConnectorApiKeyInterceptor
public ConnectorApiKeyInterceptor()CDI.
-
-
Method Details
-
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:
interceptCallin interfaceio.grpc.ServerInterceptor
-