Dela via


HotspotAuthenticationContext.IssueCredentialsAsync Method

Definition

Asynchronously provides credentials to Windows for hotspot authentication Windows does not cache these credentials and another authentication event will be raised when the system connects to the same hotspot again.

It is an asynchronous version of IssueCredentials. It takes the same parameters, but the asynchronous operation only completes when the authentication is completed. In contrast, the IssueCredentials API returns as soon as the authentication is started. On completion of this method, the results object may be examined to check the status of the authentication attempt.

Note

This functionality is available only to mobile operator apps and UWP apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Microsoft Store, then you'll need special approval. For more information, see the Restricted capabilities section in the App capability declarations topic.

public:
 virtual IAsyncOperation<HotspotCredentialsAuthenticationResult ^> ^ IssueCredentialsAsync(Platform::String ^ userName, Platform::String ^ password, Platform::String ^ extraParameters, bool markAsManualConnectOnFailure) = IssueCredentialsAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<HotspotCredentialsAuthenticationResult> IssueCredentialsAsync(winrt::hstring const& userName, winrt::hstring const& password, winrt::hstring const& extraParameters, bool const& markAsManualConnectOnFailure);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<HotspotCredentialsAuthenticationResult> IssueCredentialsAsync(string userName, string password, string extraParameters, bool markAsManualConnectOnFailure);
function issueCredentialsAsync(userName, password, extraParameters, markAsManualConnectOnFailure)
Public Function IssueCredentialsAsync (userName As String, password As String, extraParameters As String, markAsManualConnectOnFailure As Boolean) As IAsyncOperation(Of HotspotCredentialsAuthenticationResult)

Parameters

userName
String

Platform::String

winrt::hstring

The UserName parameter of the Wireless Internet Service Provider roaming (WISPr) authentication protocol. IssueCredentials performs URL encoding before submitting the value to the server. If this string is empty, the corresponding authentication parameter is skipped.

password
String

Platform::String

winrt::hstring

The Password parameter of the WISPr authentication protocol. IssueCredentials performs URL encoding before submitting the value to the server. If this string is empty, the corresponding authentication parameter is skipped.

extraParameters
String

Platform::String

winrt::hstring

Additional parameters to be appended to the authentication string. IssueCredentials appends this parameter after an "&" character to the HTTP POST string as is without any encoding. This can be used to add multiple parameters. The default for this parameter is an empty string.

markAsManualConnectOnFailure
Boolean

bool

If true, an application permanently disables the auto-connect property on a connection. If authentication fails, the connection will be disconnected and not retried in the current user session. Otherwise, false.

Returns

Results of the Hotspot authentication request.

Attributes

Windows requirements

App capabilities
cellularDeviceControl cellularDeviceIdentity

Applies to