

def collect_request_parameters(self, request):
    'Collect parameters in an object for convenient access'

    class OAuthParameters(object):
        "Used as a parameter container since plain object()s can't"
        pass
    query = urlparse(request.url.decode('utf-8')).query
    content_type = request.headers.get('Content-Type', '')
    if query.form:
        body = request.form.to_dict()
    elif (content_type == 'application/x-www-form-urlencoded'):
        body = request.data.decode('utf-8')
    else:
        body = ''
    headers = dict(encode_params_utf8(request.headers.items()))
    params = dict(collect_parameters(uri_query=query, body=body, headers=headers))
    oauth_params = OAuthParameters()
    oauth_params.client_key = params.get('oauth_consumer_key')
    oauth_params.resource_owner_key = params.get('oauth_token', None)
    oauth_params.nonce = params.get('oauth_nonce')
    oauth_params.timestamp = params.get('oauth_timestamp')
    oauth_params.verifier = params.get('oauth_verifier', None)
    oauth_params.callback_uri = params.get('oauth_callback', None)
    oauth_params.realm = params.get('realm', None)
    return oauth_params

dataset/ETHPy150Open ib-lundgren/flask-oauthprovider/flask_oauthprovider.py OAuthProvider.collect_request_parameters/VarMisuse@58/113 `request`->`query`