  if oauth2_provider is not None:
      urlpatterns += patterns('',
          url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2')),
          url(r'^oauth2-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication])),
          url(r'^oauth2-with-scope-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication],
              permission_classes=[permissions.TokenHasReadWriteScope])),
      )
  
  
 
</s> remove         if not auth or auth[0].lower() != b'bearer':
 </s> add         if auth and auth[0].lower() == b'bearer':
            access_token = auth[1]
        elif 'access_token' in request.POST:
            access_token = request.POST['access_token']
        elif 'access_token' in request.GET and self.allow_query_params_token:
            access_token = request.GET['access_token']
        else: </s> remove         return self.authenticate_credentials(request, auth[1])
 </s> add         return self.authenticate_credentials(request, access_token)
        url(r'^oauth2-test-debug/$', MockView.as_view(authentication_classes=[OAuth2AuthenticationDebug])),
  if oauth2_provider is not None:
      urlpatterns += patterns('',
          url(r'^oauth2/', include('provider.oauth2.urls', namespace='oauth2')),
          url(r'^oauth2-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication])),
        url(r'^oauth2-test-debug/$', MockView.as_view(authentication_classes=[OAuth2AuthenticationDebug])),
          url(r'^oauth2-with-scope-test/$', MockView.as_view(authentication_classes=[OAuth2Authentication],
              permission_classes=[permissions.TokenHasReadWriteScope])),
      )
  
  
keep keep keep add keep keep keep keep keep
 authentication: allow all transport modes of access token in OAuth2Authentication

RFC6750 describe three transport modes for access tokens when accessing a
protected resource:
- Auhthorization header with the Bearer authentication type
- form-encoded body parameter
- URI query parameter

This patch add support for last two transport modes. 
rest_framework/tests/test_authentication.py