Skip to content

Latest commit

 

History

History

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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