  
  
      def authenticate(self, request):
          """
          :returns: two-tuple of (user, auth) if authentication succeeds, or None otherwise.
          """
          from oauth_provider.store import store
          if self.is_valid_request(request):
              oauth_request = oauth_provider.utils.get_oauth_request(request)
  
 
</s> remove from django.core.exceptions import ImproperlyConfigured
try:
    import oauth2
except ImportError:
    oauth2 = None

try:
    import oauth_provider
    from oauth_provider.store import store
except ImportError:
    oauth_provider = None

 </s> add  </s> remove         return store.check_nonce(request, oauth_request, oauth_request['oauth_nonce'])
 </s> add         return oauth_provider.store.store.check_nonce(request, oauth_request, oauth_request['oauth_nonce']) </s> remove                 request.user = token.user
                return (request.user, None)
 </s> add                 return (token.user, token) </s> remove     django-oath-plus"""
 </s> add     django-oath-plus and oauth2"""
        Returns two-tuple of (user, auth token) if authentication succeeds, or None otherwise.
  
  
      def authenticate(self, request):
          """
        Returns two-tuple of (user, auth token) if authentication succeeds, or None otherwise.
          """
          from oauth_provider.store import store
          if self.is_valid_request(request):
              oauth_request = oauth_provider.utils.get_oauth_request(request)
  
keep keep keep keep replace keep keep keep keep keep
 Move oauth2 and django-oauth-plus imports to compat and fix some minor issues

- alias oauth2 as oauth
- remove rouge print
- remove docstring markups
- OAuthAuthentication.authenticate() now returns (user, token) two-tuple on success
- don't set request.user because it's already set 
rest_framework/authentication.py