Also added some basic OAuth 2 support. Given that there's not much that can be done for OAuth 2 in a generic way (i.e., there is no standard way to obtain the bearer token from a service, etc.), OAuth 2 support is restricted to setting the bearer token in the Authorization header. All the rest has to be done depending on the respective service to talk to. Given that all the necessary building blocks are there (HTMLForm, JSON library, etc.) this should be okay.
I could imagine a separate OAuth library covering the complete OAuth work flow from obtaining the client credentials to obtaining the bearer token, including handling the refresh token, etc. but this would have to be a pretty generic framework. Not sure if it's worth doing.