SignalR Client C# - Custom Auth Scheme
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is your feature request related to a problem? Please describe.
I'm trying to override the Authorization scheme for C# SignalR Client e.g. not `Bearer`, however its doesn't seems possible as it seems to be hardcoded in https://github.com/aspnet/AspNetCore/blob/master/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs#L116
### Describe the solution you'd like
Ability to override the auth shceme, such as
```cs
new HubConnectionBuilder()
.WithUrl(url, opts =>
{
opts.AuthScheme = "Secret";
opts.AccessTokenProvider = () => Task.FromResult("XXX");
})
```
### Describe alternatives you've considered
Another option would be to pass the auth scheme in the `AccessTokenProvider` itself but might be breaking depends on how it's handled
Contributor guide
Assessment
This issue has not been assessed yet.