-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External authentification provider #98
Comments
Do you have a SSCCE? I may be wrong, but it might be related to #29
But if it's an async method, then you would probably have to block at that point, waiting for it to complete (that may or may not be the desirable effect). |
On second read, it is indeed related to #29. I ended up using a blocking http request to make my prototype run, but as the other issue pointed out, I kinda think tokio-tungstenite could use some future based authentification process that would suite me better. I took a look at the code and I think I'll have time to contribute some code next week. |
That indeed would be very useful as it would allow to "inject" some middleware at this stage. |
So I finally found some time to dig this issue, and there is indeed some work needed on tungstenite itself to make it process an async callback. |
Also running into this issue. Has there been any progress on this? |
From what I have been reading on other issue, no |
Update to http 0.2
Hi everyone
I am trying to use an external api as the authentification provider to allow or deny websocket connection to my system.
I want to pass some of the websocket creation request from the client to the api, and my current code looks like:
My issue is that I don't get how I can make the
auth_middleware_callback
an async closure (I get a compiler error saying they are not supported yet) and the lib give my some big type missmatch error if I try to feed it an async function.I feel like I am missing something here, as the
accept_hdr_async
feels quite tailored for local authentification, but I don't see how to adapt it to my use case.Thank you and have a nice day
The text was updated successfully, but these errors were encountered: