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
Add client-side authentication features #8806
Conversation
flow-client/src/main/resources/META-INF/resources/frontend/Connect.ts
Outdated
Show resolved
Hide resolved
flow-client/src/main/resources/META-INF/resources/frontend/Connect.ts
Outdated
Show resolved
Hide resolved
flow-client/src/main/resources/META-INF/resources/frontend/Connect.ts
Outdated
Show resolved
Hide resolved
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.
So now that Middleware
works as a bare function or class I get it that we need to call it as middleware.call(middleware, context, next)
, but imo it makes the code a bit confusing as in the class case the call
method gets an unnecessary parameter that's not needed.
I think it would be cleaner to have a Middleware
type which would be a union of two different types, where one is like the old function type and another is the new class interface and we can detect it to call them differently. This way anyone who creates a middleware class doesn't need to wonder why there's an extra parameter needed for the call method.
Otherwise this looks good except some typos I found.
No description provided.