Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 2.21 KB

README.md

File metadata and controls

34 lines (28 loc) · 2.21 KB

Knot.x Server API

This module defines contracts and factories interfaces for creating Handlers used during the server route processing.

Contracts

Please refer to the Data Objects docs for the detailed information about API contracts.

Routing Handlers

Routing Hanlders are the basic Handlers that can be plugged into the route processing and operate on the RoutingContext.

RequestEventHandler is basic implementation of such handler.

Creating Routing Handler

Implement RoutingHandlerFactory that:

  • is identified by name in the operations configuration
  • is registered for the Service Loader in META-INF/services/io.knotx.server.api.handler.RoutingHandlerFactory
  • creates Handler<RoutingContext> instance that operates on the RoutingContext.

Security Handlers

AuthHandler is responsible for providing authentication for routes.

Creating Auth Handler

Implement AuthHandlerFactory that:

  • is identified by name in server security handlers configuration
  • is registered for the Service Loader in META-INF/services/io.knotx.server.api.security.AuthHandlerFactory
  • creates AuthHandler instance corresponding to the type defined in the Open API security scheme