PFAuthenticationGetEntityWithSecretKeyAsync

将旧版 AuthenticationTicket 或游戏 SecretKey 交换为实体令牌或刷新仍然有效的实体令牌的方法。

语法

HRESULT PFAuthenticationGetEntityWithSecretKeyAsync(  
    PFServiceConfigHandle serviceConfigHandle,  
    const char* secretKey,  
    const PFAuthenticationGetEntityRequest* request,  
    XAsyncBlock* async  
)  

参数

serviceConfigHandle PFServiceConfigHandle

从 PFServiceConfigCreateHandle 调用返回的 PFServiceConfigHandle。

secretKey char*
In_z

用于对服务请求进行身份验证的游戏密钥。

requestPFAuthenticationGetEntityRequest*

已填充的请求对象。

async XAsyncBlock*
Inout

异步操作的 XAsyncBlock。

返回值

类型:HRESULT

此 API 操作的结果代码。

备注

此 API 在 Win32、Linux 和 macOS 上可用。 必须使用 X-SecretKey、X-Authentication 或 X-EntityToken 标头调用此 API。 可以包含可选的 EntityKey 来尝试将生成的 EntityToken 设置为特定实体,但该实体必须是调用方的关系,例如角色的 master_player_account。 如果发送 X-EntityToken,帐户将标记为新登录,并将颁发新令牌。 如果使用 X-Authentication 或 X-EntityToken,标头必须仍然有效,并且不能过期或已吊销。 异步任务完成后,调用 PFAuthenticationGetEntityWithSecretKeyGetResult 以获取结果。

要求

标头:PFAuthentication.h

另请参阅

PFAuthentication 成员