This PR depends upon node-oauth-server#203 and introduces a cleaner koa-specific implementation that also allows for the OAuth model class to export generator functions instead of node-style callback functions.
Furthermore, the examples previously found in the node-oauth2-server repository were moved here since they're all dependent on Koa.
Koa-OAuth-Server
Introduces a new Koa OAuth server wrapper with the following changes:
Added wrapping of model functions to support generator functions.
Fixed OAuth token is now exposed in the Koa context's state instead of injected into the current context.
Fixed objects retrieved from the model are no longer injected into the execution context.
Improved handling of errors by simply copying the underlying response, instead of hard-coding the error, _errordescription and code properties.
Removed express framework-specific response handling.
Removed passthroughErrors in favor of always emitting the thrown error.
This PR depends upon node-oauth-server#203 and introduces a cleaner koa-specific implementation that also allows for the OAuth model class to export generator functions instead of node-style callback functions.
Furthermore, the examples previously found in the node-oauth2-server repository were moved here since they're all dependent on Koa.
Koa-OAuth-Server
Introduces a new Koa OAuth server wrapper with the following changes:
express
framework-specific response handling.passthroughErrors
in favor of always emitting the thrown error.