-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Authorization & middlewares #27
Comments
hi @yallxe thanks. I just pushed digest auth server support. Maybe share more what you have in mind or checkout latest code. |
I will describe the issue on an example. A simple problem that comes to my mind is fetching user from some database to verify if he is authorised to perform current request and additionally having access to some of user data within the whole dialog flow. Now, when you've implemented the digest auth server support, it is possible to first authorise the user and if he is granted access to process with the call we can fetch additional data needed within the dialog. But it makes at least two requests to database. It could fetch all user data once. I'm not sure how middlewares would look in golang as I don't have a lot of experience in it. The only thing that I don't like about them is that they can explicitly modify the state, which can sometimes be confusing. If I hit some idea regarding this I will comment here later. |
P.S. Auth is not really extensible now. Sometimes it is not just digest auth, but for example an IP check, if TCP is used. Or maybe even some custom logic. |
@yallxe All those checks are possible, I have already project doing all this. registrar (location service), ip auth, transport auth, digest auth all you can add on top. |
Hi, first of all thanks for this library and for sipgo a lot.
My question is, will there be middlewares (and maybe builtin auth support) in the library? If so, how would it look in your mind, and do you accept PRs for the project?
The text was updated successfully, but these errors were encountered: