跳转到主要内容
使用 PlayStation :tm: Network 身份验证代码为用户登录,并返回可在后续需要已验证用户的 API 调用中使用的会话标识符

语法

参数

serviceConfigHandle   PFServiceConfigHandle 从 PFServiceConfigCreateHandle 调用返回的 PFServiceConfigHandle。 secretKey   char*
In_z
用于对服务请求进行身份验证的游戏密钥。 request   PFAuthenticationServerLoginWithPSNRequest* 已填充的请求对象。 async   XAsyncBlock*
Inout
用于异步操作的 XAsyncBlock。

返回值

类型:HRESULT 此 API 操作的结果代码。

备注

此 API 在 Windows 上可用。如果这是用户首次使用 PlayStation :tm: Network 帐户登录且 CreateAccount 设为 true,将创建一个新的 PlayFab 帐户并链接到该 PlayStation :tm: Network 帐户。在这种情况下,该 PlayFab 帐户将没有关联的电子邮件或用户名。否则,如果没有 PlayFab 帐户链接到该 PlayStation :tm: Network 帐户,将返回相应的错误,以便游戏引导用户创建 PlayFab 帐户。另请参阅 ServerLinkPSNAccountAsync、ServerUnlinkPSNAccountAsync。异步任务完成后,调用 PFAuthenticationServerLoginWithPSNGetResult 以获取结果。

要求

头文件: PFAuthentication.h

另请参阅

PFAuthentication 成员
最后修改于 2026年10月6日