-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
Description
Hello @ianstormtaylor,
coming from Bearer Token Usage environment there are a couple of things I couldn't find in your library. These might make sense to adopt so that the library is ready for use for Resource Servers.
- Clients MUST NOT use more than one method to transmit the token in each request. Currently when both header and query is presented header is returned. An error should be thrown instead.
- Three methods of sending bearer access tokens are defined,
application/x-www-form-urlencodedbody is missing at the moment. I understand this might be tricky to explain to users but most commonlyreq.bodyis populated by popular body parsers in frameworks such as express, forkoa-bodyan option needs to be passed ({ patchNode: true }).
What's your opinion on this and would you accept a PR filling it in? My proposal,
- export OAuth2Bearer with these extra features
- throw when multiple methods are presented
- check for req.body access_token param