-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[help needed] Authentication Verification inside websocket handler for room #895
Comments
First of all @rebootcode thanks for your nice words about Iris and your contribution with your questions, bug reporting and more over the last months, I really appreciate good devs with meanful questions. If you don't join the client to a room manually it will not be able to send a message, even if you Note: Please setup the |
|
@corebreaker I just want to add that you can access the ctx inside the websocket handler by doing: |
Former-commit-id: 560fc8b911a9c1352be577d2f7bebd1fac7b5d4a
First of all, I am always a fan of this amazing framework. Thanks to @kataras who is been devoting so much his time to build such an amazing piece of code. I am learning golang every day using this framework and it is such a major boost to confidence.
While coding for my app, I can not solve myself on how I can verify users inside WebSocket handler for Room/group chat.
Since
ctx
response cannot be used insideWebSocket handler
. I am confused to figure out, how verification can be done for users chatting in the room whether they are allowed to chat or not in given room.My Code :-
As you can see above, it does not verify where
dat["name"]
is allowed to chat on given room or not. I need tips/help to add a hook for limiting room to chat between only allowed users without compromising the performance 😞I am using iris 8.5 while writing this code and inside my app.
The text was updated successfully, but these errors were encountered: