restsharp/RestSharp — pull request #365 by ErikSchierboom (2013-03-30 09:48:05+00:00)
Title: Added support for token type in OAuth2Authenticator. fixes #364

The `OAuth2AuthorizationRequestHeaderAuthenticator` class is based on a relatively old version of the OAuth 2 spec, namely [v10](http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1) whereas the latest version is [v31](http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-7.1). One of the differences between those versions is that the token in the authorization header is now not always prefixed with "OAuth ", but can also be prefixed with other token types such as "Bearer ". The `OAuth2AuthorizationRequestHeaderAuthenticator` class should be updated to support these other token types.

This pull request adds support for specifying the token type. It does this by adding an additional constructor that takes the token type as an additional parameter. This change is backwards-compatible with the previous version.