-
Notifications
You must be signed in to change notification settings - Fork 113
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
Introduce InitiatorIDs #4587
Introduce InitiatorIDs #4587
Conversation
Note: This hacks into the auth middleware because it is only adding 2 lines of code there. The alternative would be to add a lot more code for a dedicated middleware. However I am a bit reluctant to do that as it will bring more complexity to a already complex part of the code |
Yeah ... not pretty ... the correct way would be a dedicated middleware. The current implementation only passes the initiator-id when the user is authenticated, but the initiator-id should not depend on that. |
I'm ok with this to get a PoC, but we should take the time and implement this properly. |
It is not really about time. I'm concerned additional middlewares make the logic even more complex. Also I am not really sure having a middleware that just extracts one parameter is worth it. Maybe if we had more ids or other information we want to pass down to ocis then this would make more sense
If you are not authenticated, you do not have an sse connection, hence you do not receive any clientlog events anyways. So there is no need for passing the initiatorid in that case |
Signed-off-by: jkoberg <jkoberg@owncloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOLO
Allows sending a header
Initiator-ID
on http requests. This will be passed down ocis and returned on sse events. Clients can use this to avoid unnecessary requests.See ticket for more details: owncloud/ocis#8677