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

# XGameUiWebAuthenticationResultData

> XGameUiWebAuthenticationResultData

# XGameUiWebAuthenticationResultData

包含 Web 身份验证请求的响应。

## 语法

```cpp theme={null}
typedef struct XGameUiWebAuthenticationResultData {  
    HRESULT responseStatus ;  
    size_t responseCompletionUriSize;  
    const char* responseCompletionUri;  
} XGameUiWebAuthenticationResultData  
```

### 成员

*responseStatus*
类型：HRESULT

指示 Web 视图身份验证的状态。成功时为 `S_OK`；如果用户通过点击“返回”按钮手动关闭 Web 视图，则为 `E_CANCELLED`。

*responseCompletionUriSize*\
类型：size\_t

响应数据的大小（以字节为单位），存储在 *responseCompletionUri* 中。

*responseCompletionUri*\
类型：const char\*

完整的响应数据，采用 URI 格式。

## 备注

调用 [XGameUiShowWebAuthenticationResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md) 后，你可以访问此结构。

你可以检查 *responseStatus* 字段以查看授权请求是否成功。如果身份验证浏览器成功导航到完成 URI，则该字段将包含 `S_OK`；否则将包含 `E_CANCELLED`，表示用户通过按“返回”取消了操作。

如果授权请求成功，则响应数据将包含基础回调 URI 以及 OAuth 提供程序在验证用户后附加的所有参数（如访问令牌、过期时间等）。

如果授权请求被取消，则响应数据将为空字符串。

## 要求

**标头：** XGameUI.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 请参阅

[XGameUI](https://docs.xbox.com/zh-CN/reference/system/xgameui/xgameui_members.md)\
[XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md)\
[XGameUiShowWebAuthenticationResultSize](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize.md)\
[XGameUiShowWebAuthenticationResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)\
[异步编程模型](https://docs.xbox.com/zh-CN/build/core-features/common/async/async-programming-model.md)


## Related topics

- [XGameUiShowWebAuthenticationResult](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)
- [XGameUiShowWebAuthenticationResultSize](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize.md)
- [XGameUiShowWebAuthenticationAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationasync.md)
- [XGameUiShowWebAuthenticationWithOptionsAsync](https://docs.xbox.com/zh-CN/reference/system/xgameui/functions/xgameuishowwebauthenticationwithoptionsasync.md)
- [XGameUI（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xgameui/xgameui_members.md)
