def get_oauth_request(request):
 headers = {}
 if ('HTTP_AUTHORIZATION' in request.META):
  headers['Authorization'] = request.META['HTTP_AUTHORIZATION']
 return oauth.Request.from_request(request.method, request.build_absolute_uri(request.path), headers, dict(request.REQUEST))

def get_oauth_request ( request ) : headers = { } if ( 'HTTP_AUTHORIZATION' in request . META ) : headers [ 'Authorization' ] = request . META [ 'HTTP_AUTHORIZATION' ] return oauth . Request . from_request ( request . method , request . build_absolute_uri ( request . path ) , headers , dict ( request . REQUEST ) )
converts a django request object into an oauth2 .