mitsuhiko/flask-oauth — pull request #49 by bitbeans (2013-05-14 12:31:51+00:00)
Title: Added Authorization Request Header and changed the google example

Some OAuth provider (for example Google) needs an authentication header in the following format:
**Authorization: Bearer mF_9.B5f-4.1JqM**
The word between Authorization and the token can be different based on the provider:
"Bearer", "OAuth", "OAuth2"...

```python
google = oauth.remote_app('google',
base_url='https://www.google.com/accounts/',
authorize_url='https://accounts.google.com/o/oauth2/auth',
request_token_url=None,
request_token_params={'scope': 'https://www.googleapis.com/auth/userinfo.email',
'response_type': 'code'},
access_token_url='https://accounts.google.com/o/oauth2/token',
access_token_method='POST',
access_token_params={'grant_type': 'authorization_code'},
#Add the OAuth2 authentication header, necessary for some OAuth provider (google, wordpress...)
#Authorization: Bearer mF_9.B5f-4.1JqM
bearer_authorization_header=True, #Default: False
bearer_authorization_header_prefix='OAuth', #Default: 'Bearer'
consumer_key=GOOGLE_CLIENT_ID,
consumer_secret=GOOGLE_CLIENT_SECRET)
```
With this change it is possible to use Provider which needs an authentication header like any other Providers. (see modified google.py).
The existing example (google.py) was just a workarround .It was not possible to use the tokengetter function correctly.