Make oauth generic by offering optional options 

Hey guys. We have made a very simple but extremely useful modification to the oauth authenticator.

We have a requirement where there are three different ways to get an oauth token: username/pw, anonymous with app secret and passing along a cookie. 

I've changed it so instead of the authenticator data being hard coded to grantType password and the username/pw, it calls a function that processes the credentials object. This allows us to easily implement fine grained logic and keeping it DRY.

I've also changed the name to oauth2-generic to reflect it can handle more than just the password-grant. 

Let me know if this suffices or whether you don't like the idea/need more, etc. Thanks.