

def generate_auth_header(consumer_key, timestamp, nonce, signature_type, signature, version='1.0', next=None, token=None, verifier=None):
    "Builds the Authorization header to be sent in the request.\n\n  Args:\n    consumer_key: Identifies the application making the request (str).\n    timestamp:\n    nonce:\n    signature_type: One of either HMAC_SHA1 or RSA_SHA1\n    signature: The HMAC or RSA signature for the request as a base64\n        encoded string.\n    version: The version of the OAuth protocol that this request is using.\n        Default is '1.0'\n    next: The URL of the page that the user's browser should be sent to\n        after they authorize the token. (Optional)\n    token: str The OAuth token value to be used in the oauth_token parameter\n        of the header.\n    verifier: str The OAuth verifier which must be included when you are\n        upgrading a request token to an access token.\n  "
    params = {
        'oauth_consumer_key': consumer_key,
        'oauth_version': version,
        'oauth_nonce': nonce,
        'oauth_timestamp': str(timestamp),
        'oauth_signature_method': signature_type,
        'oauth_signature': signature,
    }
    if (next is not None):
        params['oauth_callback'] = str(next)
    if (token is not None):
        params['oauth_token'] = params
    if (verifier is not None):
        params['oauth_verifier'] = verifier
    pairs = [('%s="%s"' % (k, urllib.quote(v, safe='~'))) for (k, v) in params.iteritems()]
    return ('OAuth %s' % ', '.join(pairs))

dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py generate_auth_header/VarMisuse@111/468 `token`->`params`