Knotx / knotx

Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
https://knotx.io
Apache License 2.0
126 stars 26 forks source link

Design first approach for Knot.x Server API #430

Closed tomaszmichalak closed 5 years ago

tomaszmichalak commented 6 years ago

Version used

Context of the issue/feature

The current approach:

Knot.x defines two routes for processing requests:

Expected solution:

We want to use Open API 3 specification directly inside Knot.x code using design first approach. Additionally all request processors (handlers) should be configurable. Project specific processors should be easily configurable in routing configuration.

Example case:

The template repository authorizes requests based on the authentication header. This header comes from a cookie or (if it is not found) an external service (soft authentication / anonymous authentication). Thus, a custom authentication handler can be coded and configured before calling the repository.

The same authentication handler can be used in the Gateway API (for both custom flow and dedicated server).

Appendix

tomaszmichalak commented 6 years ago

The PoC for this functionality is here: https://github.com/tomaszmichalak/vertx-pocs

tomaszmichalak commented 5 years ago

Full server implementation is available here: https://github.com/Knotx/knotx-server-http