Open
Description
openedon Apr 14, 2023
Is there an existing issue for this?
- I have searched the existing issues
Product
Strawberry Shake
Describe the bug
In the Authentication section of the documentation si described that, in order to configure the authentication header for WebSockets, I can use the SetRequestHeader() method under Options
services
.AddConferenceClient()
.ConfigureWebSocketClient(client =>
{
client.Uri = new Uri("ws://localhost:" + port + "/graphql");
client.Socket.Options.SetRequestHeader("Authorization", "Bearer ...");
});
But under client.Socket
there is no Options
field.
Steps to reproduce
- Create a sample .NET 7 Console project.
- Import the
StrawberryShake.Server
and theMicrosoft.Extensions.Hosting
NuGet packages. - Follow the get started guide until
ConferenceClient
is created - Try to setup the headers in
Program.cs
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) => {
services.AddConferenceClient()
.ConfigureWebSocketClient(client => {
client.Socket.Options.SetRequestHeader("Authorization", "Bearer ...");
});
})
.Build();
host.Run();
Relevant log output
No response
Additional Context?
No response
Version
13.0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment