balgarath/oauth2-express — pull request #1 by kainosnoema (2011-11-23 03:20:06+00:00)
Title: Suggested changes

Hey Ralph, not bad on this library so far. In order to clean things up even further and fix some bugs that Lee and I ran into, I've made some changes to the LK fork. Feel free to merge into your's if you feel like it.

1) I went ahead and renamed the project oauth2-connect, since it doesn't depend on express, and should work in any connect app that includes the body-parser. If this seems reasonable, you'll probably have to rename your's as well, and this might cause dependency issues...

2) We want to keep the backend as agnostic and ignorant as possible, while keeping method names descriptive. We now only pass in the exact parameters the backend needs, and expect certain things back. This keeps the "contract" between the front and back ends really simple and understandable. Pushing the entire request through is asking for trouble IMHO...

3) Moved the client_id and client_secret parsing into the front-end (this) module. This parsing is always done the same way, so there's no need to force the backend to do it.