

def prepare_token_revocation_request(url, token, token_type_hint='access_token', callback=None, body='', **kwargs):
    'Prepare a token revocation request.\n\n    The client constructs the request by including the following parameters\n    using the "application/x-www-form-urlencoded" format in the HTTP request\n    entity-body:\n\n    token   REQUIRED.  The token that the client wants to get revoked.\n\n    token_type_hint  OPTIONAL.  A hint about the type of the token submitted\n    for revocation.  Clients MAY pass this parameter in order to help the\n    authorization server to optimize the token lookup.  If the server is unable\n    to locate the token using the given hint, it MUST extend its search across\n    all of its supported token types.  An authorization server MAY ignore this\n    parameter, particularly if it is able to detect the token type\n    automatically.  This specification defines two such values:\n\n        * access_token: An access token as defined in [RFC6749],\n             `Section 1.4`_\n\n        * refresh_token: A refresh token as defined in [RFC6749],\n             `Section 1.5`_\n\n        Specific implementations, profiles, and extensions of this\n        specification MAY define other values for this parameter using the\n        registry defined in `Section 4.1.2`_.\n\n    .. _`Section 1.4`: http://tools.ietf.org/html/rfc6749#section-1.4\n    .. _`Section 1.5`: http://tools.ietf.org/html/rfc6749#section-1.5\n    .. _`Section 4.1.2`: http://tools.ietf.org/html/rfc7009#section-4.1.2\n\n    '
    if (not is_secure_transport(url)):
        raise InsecureTransportError()
    params = [('token', token)]
    if token_type_hint:
        params.append(('token_type_hint', token_type_hint))
    for k in kwargs:
        if kwargs[k]:
            params.append((unicode_type(k), kwargs[k]))
    headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
    }
    if callback:
        params.append(('callback', callback))
        return (add_params_to_uri(url, params), headers, body)
    else:
        return (url, headers, add_params_to_qs(body, params))

dataset/ETHPy150Open idan/oauthlib/oauthlib/oauth2/rfc6749/parameters.py prepare_token_revocation_request/original