npm.io
0.0.0 • Published 7 years ago

whook-authorization

Licence
MIT
Version
0.0.0
Deps
2
Size
25 kB
Vulns
0
Weekly
0
Stars
31

whook-authorization

A wrapper to provide authorization support to a Whook server

GitHub license NPM version

To see how to add authorization support to your application, have a look at the create-whook project, it will be well documented here as soon as possible.

API

Constants

optionsWithCORSPromise.<Object>

A simple Whook handler that just returns a 200 OK HTTP response

Functions

wrapHandlerWithCORS(initHandler)function

Wrap an handler initializer to append CORS to response.

augmentAPIWithCORS(API)Promise.<Object>

Augment an OpenAPI to also serve OPTIONS methods with the CORS added.

optionsWithCORS ⇒ Promise.<Object>

A simple Whook handler that just returns a 200 OK HTTP response

Kind: global constant
Returns: Promise.<Object> - The HTTP response object

wrapHandlerWithCORS(initHandler) ⇒ function

Wrap an handler initializer to append CORS to response.

Kind: global function
Returns: function - The handler initializer wrapped

Param Type Description
initHandler function The handler initializer

augmentAPIWithCORS(API) ⇒ Promise.<Object>

Augment an OpenAPI to also serve OPTIONS methods with the CORS added.

Kind: global function
Returns: Promise.<Object> - The augmented OpenAPI object

Param Type Description
API Object The OpenAPI object

Authors

License

MIT