共用方式為


HotspotAuthenticationContext.IssueCredentials 方法

定義

提供認證給 Windows 以進行熱點驗證

注意

這項功能僅適用於行動電信業者應用程式,以及行動網路操作員提供特殊許可權存取的 UWP 應用程式。

如果您想要使用此 API 並將您的應用程式發佈至 Microsoft Store,則需要特殊核准。 如需詳細資訊,請參閱應用程式功能宣告主題中的受限制功能一節。

Windows 不會快取這些認證,當系統再次連線到相同的熱點時,將會引發另一個驗證事件。

public:
 virtual void IssueCredentials(Platform::String ^ userName, Platform::String ^ password, Platform::String ^ extraParameters, bool markAsManualConnectOnFailure) = IssueCredentials;
void IssueCredentials(winrt::hstring const& userName, winrt::hstring const& password, winrt::hstring const& extraParameters, bool const& markAsManualConnectOnFailure);
public void IssueCredentials(string userName, string password, string extraParameters, bool markAsManualConnectOnFailure);
function issueCredentials(userName, password, extraParameters, markAsManualConnectOnFailure)
Public Sub IssueCredentials (userName As String, password As String, extraParameters As String, markAsManualConnectOnFailure As Boolean)

參數

userName
String

Platform::String

winrt::hstring

無線因特網服務提供者漫遊 (WISPr) 驗證通訊協定的 UserName 參數。 IssueCredentials 會在將值提交至伺服器之前執行 URL 編碼。 如果這個字串是空的,則會略過對應的驗證參數。

password
String

Platform::String

winrt::hstring

WISPr 驗證通訊協定的 Password 參數。 IssueCredentials 會在將值提交至伺服器之前執行 URL 編碼。 如果這個字串是空的,則會略過對應的驗證參數。

extraParameters
String

Platform::String

winrt::hstring

要附加至驗證字串的其他參數。 IssueCredentials 會將此參數附加在 HTTP POST 字串的 “&” 字元後面,就像沒有編碼。 這可用來新增多個參數。 此參數的預設值是空字串。

markAsManualConnectOnFailure
Boolean

bool

如果 為 true,應用程式會永久停用連線上的自動連線屬性。 如果驗證失敗,連線將會中斷連線,而不會在目前的用戶會話中重試。 否則為 false

Windows 需求

應用程式功能
cellularDeviceControl cellularDeviceIdentity

備註

呼叫 IssueCredentials 之後,驗證內容就會完成,且不應再次呼叫 IssueCredentials、 AbortAuthenticationSkipAuthentication

適用於