-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
[feature request] auth interface #2
Comments
@xurwxj hello! Great to see your interest to this project. That But if you are talking about using this library from Go language code then it's already possible to authenticate user in any way you want using convenient middleware approach - as shown in example. You have That example is for Websocket and SockJS as HTTP server middleware is used. For GRPC it will be possible in GRPC-specific way - using interceptor. Though we have no clients for GRPC endpoint yet, only proof of concept client Does it make sense? Also I must note that this library is not a complete work at moment, API will break - but I suppose you saw this warning in repo description. |
@FZambia thanks for your great job. This library is very meaningful to me.
|
This library must anyway be used together with robust persistent storage for messages - i.e. main application database if you want reliable delivery and history, library provides a best effort to recover some missed messages (in configured time interval and limited by configured size) but the only source of truth is your main database. You better consider Centrifuge lib only as persistent connection hub and transport for real-time messages. It has at most once delivery – so when you need at least once for example then you had to implement sth on top of this library in your code - message acks maybe. It's hard for me to give a concrete advices at moment - as I had no real experience building sth complicated on top of this lib. I am interested in any feedback from you whatever you end up with - any downside can theoretically be fixed at this stage I hope. |
@FZambia thanks a lot. I need to think about it, maybe I will build a new library based on your library. I will feed back when I have a progress. |
Can u abstract the method in /internal/auth/auth.go as an interface, so is it convenient for users to use this library to verify logic with their own auth sys? For example, access to the existing user system or redis's session.
The text was updated successfully, but these errors were encountered: