oauthjs / koa-oauth-server

Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with koa in node.js
212 stars 81 forks source link

Added support for non-header bearer tokens via proxy around Koa request #33

Closed brownstein closed 1 year ago

brownstein commented 8 years ago

This is a fix for issue #30 - Koa requests return an empty string when a header is missing instead of oauth2-server's expected undefined. This PR wraps authorize requests with a proxy and overrides .get to rectify the issue.

I'm a little ambivalent about adding the node-proxy dependency given that Harmony proxies are supported in recent nodes, but I think its probably the most universally-compatible way to do this.