Google云如何获取用于创建RequestMetadata对象的用户ID和会话ID

时间:2018-06-01 09:05:45

标签: google-app-engine google-api google-cloud-platform google-cloud-storage

Google云如何获取用于创建RequestMetadata对象的用户ID和会话ID。我有一个支持结算的Google云项目,如何获取用户ID和会话ID以创建RequestMetadata,如下所示:

RequestMetadata requestMetadata =
        new RequestMetadata()
            .setUserId("HashedUserId") // Make sure to hash the userID
            .setSessionId("HashedSessionID") // Make sure to hash the sessionID
            .setDomain(
                "www.google.com"); // This is the domain of the website on which the search is
    // conducted

0 个答案:

没有答案