dbrattli / Fable.Reaction

Fable Reaction - Reactive (AsyncRx) for F# Elmish and Fable
http://fablereaction.rtfd.io/
MIT License
142 stars 19 forks source link

How to protect WS middleware with authentication? #42

Open Neftedollar opened 4 years ago

Neftedollar commented 4 years ago

Hello, how can I allow to connect to ws (AspNetCore.Middleware) only authenticated users? If use Giraffe, I usually use requiresAuthentication to protect path, but I can't do it with this middleware.

Can I use something like this(SignalR authentication): https://docs.microsoft.com/en-us/aspnet/core/signalr/authn-and-authz?view=aspnetcore-2.1#bearer-token-authentication

dbrattli commented 4 years ago

Hi, I'm unsure about this. Probably you should use some features / extensions to AspNetCore, but I really don't know.