> ## 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.

# 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](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationresult) 之後存取此結構。

您可以檢查 *responseStatus* 欄位，以查看授權要求是否成功。如果驗證瀏覽器成功瀏覽至完成 URI，此欄位會包含 `S_OK`；否則會包含 `E_CANCELLED`，表示使用者按下返回而取消。

如果授權要求成功，回應資料會包含基底回呼 URI，以及 OAuth 提供者在驗證使用者後所加入的任何參數 (存取權杖、到期時間等)。

如果授權要求已取消，回應資料會是 null 字串。

## 需求

**標頭：** XGameUI.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XGameUI](/zh-TW/reference/system/xgameui/xgameui_members)\
[XGameUiShowWebAuthenticationAsync](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationasync)\
[XGameUiShowWebAuthenticationResultSize](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationresultsize)\
[XGameUiShowWebAuthenticationResult](/zh-TW/reference/system/xgameui/functions/xgameuishowwebauthenticationresult)\
[非同步程式設計模型](/zh-TW/build/core-features/common/async/async-programming-model)


## Related topics

- [XGameUiWebAuthenticationResultData](/reference/system/xgameui/structs/xgameuiwebauthenticationresultdata.md)
- [XGameUiShowWebAuthenticationResult](/reference/system/xgameui/functions/xgameuishowwebauthenticationresult.md)
