Package Exports
- @kronos-integration/service-http
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kronos-integration/service-http) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
kronos-service-koa
koa backed http server
API
Table of Contents
- ServiceHTTP
- HTTPEndpoint
- WSEndpoint
- authenticate
- CTXInterceptor
- CTXBodyParamInterceptor
- CTXJWTVerifyInterceptor
ServiceHTTP
Extends Service
HTTP server
Properties
serverhttp.Server only present if state is running
extendetName
Returns string name with url
endpointFactoryFromConfig
on demand create RouteSendEndpoint´s
Parameters
Returns Class RouteSendEndpoint if path is present of name starts with '/'
name
Returns string 'http'
HTTPEndpoint
Extends SendEndpoint
Endpoint to link against a http route
Parameters
WSEndpoint
Extends SendEndpoint
Endpoint to link against a websocket route
Parameters
namestring endpoint nameownerObject owner of the endpointoptionsObject (optional, default{})options.pathstring url path defaults to endpoint name
authenticate
check sec-websocket-protocol header for presence of 'access_token' and the token
Parameters
serviceServicerequestany
CTXInterceptor
Extends Interceptor
extracts params form request body
name
Returns string 'ctx-body-param'
CTXBodyParamInterceptor
Extends Interceptor
extracts params form request body
name
Returns string 'ctx-body-param'
CTXJWTVerifyInterceptor
Extends Interceptor
only forward requests if a valid jwt token is present
name
Returns string 'ctx-jwt-verify'
install
With npm do:
npm install kronos-service-koalicense
BSD-2-Clause
