def METHOD_NAME(headers, payload):
    # https://tools.ietf.org/html/rfc7523#section-3
    # For client authentication, the subject MUST be the
    # "client_id" of the OAuth client
    client_id = payload['sub']
    client = query_client(client_id)
    if not client:
        raise InvalidClientError()
    request.client = client
    return self.resolve_client_public_key(client, headers)