HotspotAuthenticationContext HotspotAuthenticationContext HotspotAuthenticationContext HotspotAuthenticationContext Class

Definition

Provides the authentication context that contains details of the current authentication attempt and provides methods to perform the authentication.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : sealed class HotspotAuthenticationContext : IHotspotAuthenticationContext, IHotspotAuthenticationContext2public sealed class HotspotAuthenticationContext : IHotspotAuthenticationContext, IHotspotAuthenticationContext2Public NotInheritable Class HotspotAuthenticationContext Implements IHotspotAuthenticationContext, IHotspotAuthenticationContext2// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

AuthenticationUrl AuthenticationUrl AuthenticationUrl AuthenticationUrl

Gets the HTTPS URL specified in the Wireless Internet Service Provider roaming (WISPr) redirect message.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

Applications must determine whether to trust this URL for providing credentials.

public : Uri AuthenticationUrl { get; }public Uri AuthenticationUrl { get; }Public ReadOnly Property AuthenticationUrl As Uri// You can use this property in JavaScript.
Value
Uri Uri Uri Uri

A URI that contains the HTTPS authentication URL.

Remarks

Applications should not assume they are only invoked for authentication attempts for profiles they created themselves. An application from another operator could have mistakenly created a profile that invokes the application of another operator for issuing credentials. The authentication context contains all relevant parameters of the authentication attempt.

NetworkAdapter NetworkAdapter NetworkAdapter NetworkAdapter

Gets the network interface that is connected to the WLAN access point of the hotspot.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : NetworkAdapter NetworkAdapter { get; }public NetworkAdapter NetworkAdapter { get; }Public ReadOnly Property NetworkAdapter As NetworkAdapter// You can use this property in JavaScript.
Value
NetworkAdapter NetworkAdapter NetworkAdapter NetworkAdapter

An object that uniquely identifies the network.

RedirectMessageUrl RedirectMessageUrl RedirectMessageUrl RedirectMessageUrl

Gets the URL of the web page where the Wireless Internet Service Provider roaming (WISPr) redirect message was found.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : Uri RedirectMessageUrl { get; }public Uri RedirectMessageUrl { get; }Public ReadOnly Property RedirectMessageUrl As Uri// You can use this property in JavaScript.
Value
Uri Uri Uri Uri

A URI that contains the HTTPS or HTTP redirect URL.

RedirectMessageXml RedirectMessageXml RedirectMessageXml RedirectMessageXml

Gets the XML blob of the Wireless Internet Service Provider roaming (WISPr) redirect message of the hotspot.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : XmlDocument RedirectMessageXml { get; }public XmlDocument RedirectMessageXml { get; }Public ReadOnly Property RedirectMessageXml As XmlDocument// You can use this property in JavaScript.
Value
XmlDocument XmlDocument XmlDocument XmlDocument

The WISPr XML blob from the hotspot redirect message.

WirelessNetworkId WirelessNetworkId WirelessNetworkId WirelessNetworkId

Gets the SSID of the WLAN access point of the hotspot.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : byte[] WirelessNetworkId { get; }public byte[] WirelessNetworkId { get; }Public ReadOnly Property WirelessNetworkId As byte[]// You can use this property in JavaScript.
Value
byte[] byte[] byte[] byte[]

A byte array that contains the SSID.

Methods

AbortAuthentication(Boolean) AbortAuthentication(Boolean) AbortAuthentication(Boolean) AbortAuthentication(Boolean)

Aborts the current authentication attempt and disconnects the WLAN interface from the hotspot.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : void AbortAuthentication(bool markAsManual)public void AbortAuthentication(Boolean markAsManual)Public Function AbortAuthentication(markAsManual As Boolean) As void// You can use this method in JavaScript.
Parameters
markAsManual
bool Boolean Boolean Boolean

If true, Windows disables the auto-connect property for the corresponding WLAN profile and avoids future auto-connects to this hotspot. Otherwise, false.

Remarks

AbortAuthentication should be called when authentication credentials can not be provided through IssueCredentials. Once AbortAuthentication is called, the authentication context is finalized and IssueCredentials, AbortAuthentication, or SkipAuthentication should not be called again.

IssueCredentials(String, String, String, Boolean) IssueCredentials(String, String, String, Boolean) IssueCredentials(String, String, String, Boolean) IssueCredentials(String, String, String, Boolean)

Provides credentials to Windows for hotspot authentication

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

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

public : void IssueCredentials(PlatForm::String userName, PlatForm::String password, PlatForm::String extraParameters, bool markAsManualConnectOnFailure)public void IssueCredentials(String userName, String password, String extraParameters, Boolean markAsManualConnectOnFailure)Public Function IssueCredentials(userName As String, password As String, extraParameters As String, markAsManualConnectOnFailure As Boolean) As void// You can use this method in JavaScript.
Parameters
userName
PlatForm::String String String String

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
PlatForm::String String String String

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
PlatForm::String String String String

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
bool Boolean Boolean Boolean

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.

Remarks

Once IssueCredentials is called, the authentication context is finalized and IssueCredentials, AbortAuthentication, or SkipAuthentication should not be called again.

IssueCredentialsAsync(String, String, String, Boolean) IssueCredentialsAsync(String, String, String, Boolean) IssueCredentialsAsync(String, String, String, Boolean) IssueCredentialsAsync(String, String, String, Boolean)

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 only available to mobile operator apps and Windows Store apps given privileged access by mobile network operators.

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : IAsyncOperation<HotspotCredentialsAuthenticationResult> IssueCredentialsAsync(PlatForm::String userName, PlatForm::String password, PlatForm::String extraParameters, bool markAsManualConnectOnFailure)public IAsyncOperation<HotspotCredentialsAuthenticationResult> IssueCredentialsAsync(String userName, String password, String extraParameters, Boolean markAsManualConnectOnFailure)Public Function IssueCredentialsAsync(userName As String, password As String, extraParameters As String, markAsManualConnectOnFailure As Boolean) As IAsyncOperation( Of HotspotCredentialsAuthenticationResult )// You can use this method in JavaScript.
Parameters
userName
PlatForm::String String String String

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
PlatForm::String String String String

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
PlatForm::String String String String

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
bool Boolean Boolean Boolean

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

SkipAuthentication() SkipAuthentication() SkipAuthentication() SkipAuthentication()

Skips Wireless Internet Service Provider roaming (WISPr) Windows authentication.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : void SkipAuthentication()public void SkipAuthentication()Public Function SkipAuthentication() As void// You can use this method in JavaScript.

Remarks

SkipAuthentication can be used to implement a proprietary authentication flow. When SkipAuthentication is called, Windows checks the current Internet connectivity status over the corresponding network interface. Thus, applications implementing their own authentication should call this API when their authentication sequence is completed.

Once IssueCredentials is called, the authentication context is finalized and IssueCredentials, AbortAuthentication, or SkipAuthentication should not be called again.

TriggerAttentionRequired(String, String) TriggerAttentionRequired(String, String) TriggerAttentionRequired(String, String) TriggerAttentionRequired(String, String)

Called by a background task handler to launch the foreground application when there is an authentication attempt to complete.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

Windows will launch the specified application.

public : void TriggerAttentionRequired(PlatForm::String packageRelativeApplicationId, PlatForm::String applicationParameters)public void TriggerAttentionRequired(String packageRelativeApplicationId, String applicationParameters)Public Function TriggerAttentionRequired(packageRelativeApplicationId As String, applicationParameters As String) As void// You can use this method in JavaScript.
Parameters
packageRelativeApplicationId
PlatForm::String String String String

The foreground application ID within its application package. The application must belong to the same package as the background task handler.

applicationParameters
PlatForm::String String String String

Optional command line parameters that are passed to the application at launch.

TryGetAuthenticationContext(String, HotspotAuthenticationContext) TryGetAuthenticationContext(String, HotspotAuthenticationContext) TryGetAuthenticationContext(String, HotspotAuthenticationContext) TryGetAuthenticationContext(String, HotspotAuthenticationContext)

Gets the context of an authentication attempt.

Note

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

If you want to use this API and publish your app to the Store, you will need special approval. For more information, see the Special and restricted capabilities section under App capability declarations.

public : static PlatForm::Boolean TryGetAuthenticationContext(PlatForm::String evenToken, HotspotAuthenticationContext context)public static bool TryGetAuthenticationContext(String evenToken, HotspotAuthenticationContext context)Public Static Function TryGetAuthenticationContext(evenToken As String, context As HotspotAuthenticationContext) As bool// You can use this method in JavaScript.
Parameters
evenToken
PlatForm::String String String String

The event token retrieved from the network operator hotspot authentication event. The token is a GUID in string format.

Returns
PlatForm::Boolean bool bool bool

If true, the authentication context was retrieved. The authentication context can only be retrieved if the calling application matches the application ID specified in the hotspot profile of the underlying WLAN connection and if the authentication hasn’t be completed by the corresponding context already or timed out.