def consumer_oauth_url_request(backend, url, user_or_id, redirect_uri='/', json=True):
 user = UserSocialAuth.resolve_user_or_id(user_or_id)
 oauth_info = user.social_auth.filter(provider=backend.AUTH_BACKEND.name)[0]
 token = Token.from_string(oauth_info.tokens['access_token'])
 request = build_consumer_oauth_request(backend, token, url, redirect_uri)
 response = '\n'.join(dsa_urlopen(request.to_url()).readlines())
 if json:
  response = simplejson.loads(response)
 return response

def consumer_oauth_url_request ( backend , url , user_or_id , redirect_uri = '/' , json = True ) : user = UserSocialAuth . resolve_user_or_id ( user_or_id ) oauth_info = user . social_auth . filter ( provider = backend . AUTH_BACKEND . name ) [ 0 ] token = Token . from_string ( oauth_info . tokens [ 'access_token' ] ) request = build_consumer_oauth_request ( backend , token , url , redirect_uri ) response = '\n' . join ( dsa_urlopen ( request . to_url ( ) ) . readlines ( ) ) if json : response = simplejson . loads ( response ) return response
builds and retrieves an oauth signed response .