  from django.core.exceptions import ImproperlyConfigured
  from rest_framework import exceptions, HTTP_HEADER_ENCODING
  from rest_framework.compat import CsrfViewMiddleware
  from rest_framework.compat import oauth, oauth_provider, oauth_provider_store
  from rest_framework.compat import oauth2_provider, provider_now
  from rest_framework.authtoken.models import Token
  
  
  def get_authorization_header(request):
      """
 
</s> remove         from oauth_provider.models import Consumer, Resource
 </s> add         from oauth_provider.models import Consumer, Scope </s> remove         return oauth_provider_store.check_nonce(request, oauth_request,
            oauth_request['oauth_nonce'], oauth_request['oauth_timestamp'])
 </s> add         oauth_nonce = oauth_request['oauth_nonce']
        oauth_timestamp = oauth_request['oauth_timestamp']
        return check_nonce(request, oauth_request, oauth_nonce, oauth_timestamp)
from rest_framework.compat import oauth2_provider, provider_now, check_nonce
  from django.core.exceptions import ImproperlyConfigured
  from rest_framework import exceptions, HTTP_HEADER_ENCODING
  from rest_framework.compat import CsrfViewMiddleware
  from rest_framework.compat import oauth, oauth_provider, oauth_provider_store
from rest_framework.compat import oauth2_provider, provider_now, check_nonce
  from rest_framework.authtoken.models import Token
  
  
  def get_authorization_header(request):
      """
keep keep keep keep replace keep keep keep keep keep
 Compat fixes for django-oauth-plus versions 2.0-2.2.1 
rest_framework/authentication.py