> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PFAuthenticationValidateEntityTokenAsync

> 服务器用于验证客户端提供的 EntityToken 的方法。只能由游戏实体调用。

服务器用于验证客户端提供的 EntityToken 的方法。只能由游戏实体调用。

## 语法

```cpp theme={null}
HRESULT PFAuthenticationValidateEntityTokenAsync(  
    PFEntityHandle entityHandle,  
    const PFAuthenticationValidateEntityTokenRequest* request,  
    XAsyncBlock* async  
)  
```

### 参数

**`entityHandle`**   PFEntityHandle

用于身份验证的 PFEntityHandle。

**`request`**   [PFAuthenticationValidateEntityTokenRequest\*](/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationvalidateentitytokenrequest)

已填充的请求对象。

**`async`**   XAsyncBlock\*<br />*Inout*

用于异步操作的 XAsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 备注

此 API 可在 Win32、Linux 和 macOS 上使用。在给定实体令牌的情况下，验证该令牌未过期或被吊销，并返回所有者的详细信息。异步任务完成后，调用 [PFAuthenticationValidateEntityTokenGetResultSize](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresultsize) 和 [PFAuthenticationValidateEntityTokenGetResult](/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresult) 获取结果。

## 要求

**头文件：** PFAuthentication.h

## 另请参阅

[PFAuthentication 成员](/services/playfab/api-references/c/pfauthentication/pfauthentication_members)


## Related topics

- [PFAuthenticationValidateEntityTokenGetResult](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresult.md)
- [服务 C API 概览 - PFAuthentication.h](/zh-CN/services/playfab/api-references/c/pfauthentication/pfauthentication_members.md)
- [PFAuthenticationValidateEntityTokenResponse](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationvalidateentitytokenresponse.md)
- [PFAuthenticationValidateEntityTokenGetResultSize](/zh-CN/services/playfab/api-references/c/pfauthentication/functions/pfauthenticationvalidateentitytokengetresultsize.md)
- [PFAuthenticationValidateEntityTokenRequest](/zh-CN/services/playfab/api-references/c/pfauthenticationtypes/structs/pfauthenticationvalidateentitytokenrequest.md)
