I have a typical SS service (ServiceA), and it publishes certain events over certain channels using an SSE server (through IServerEvents).
I have another typical SS service (ServiceB), that wants to consume SSE events on one or more of the channels.
I want to secure the connection between SEE client (serviceB) and SSE server (ServiceA).
Now, ServiceA already uses the
AuthFeature and it is configured with a custom AuthProvider that is a
IAuthWithRequest, that PreAuthenticates and inspects the Bearer token of each request.
My question is: How do I configure my SSEClient in ServiceB to connect with Authentication to the SSE Server in ServiceA?
This is how I create my SSE client now in ServiceB:
this.serverEventsClient = new ServerEventsClient(baseUrl, Channels.All); this.serverEventsClient.RegisterReceiver<GlobalReceiver>(); container.RegisterAutoWiredTypes(this.serverEventsClient.ReceiverTypes); this.serverEventsClient.Resolver = container; this.serverEventsClient.Start();
What am I missing?