Hotspot​Authentication​Context Hotspot​Authentication​Context Hotspot​Authentication​Context 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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public sealed class HotspotAuthenticationContext : IHotspotAuthenticationContext, IHotspotAuthenticationContext2public sealed class HotspotAuthenticationContext : IHotspotAuthenticationContext, IHotspotAuthenticationContext2Public NotInheritable Class HotspotAuthenticationContext Implements IHotspotAuthenticationContext, IHotspotAuthenticationContext2
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

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

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
Value
Uri Uri Uri

A URI that contains the HTTPS authentication URL.

Attributes

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

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public NetworkAdapter NetworkAdapter { get; }public NetworkAdapter NetworkAdapter { get; }Public ReadOnly Property NetworkAdapter As NetworkAdapter
Value
NetworkAdapter NetworkAdapter NetworkAdapter

An object that uniquely identifies the network.

Attributes

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public Uri RedirectMessageUrl { get; }public Uri RedirectMessageUrl { get; }Public ReadOnly Property RedirectMessageUrl As Uri
Value
Uri Uri Uri

A URI that contains the HTTPS or HTTP redirect URL.

Attributes

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public XmlDocument RedirectMessageXml { get; }public XmlDocument RedirectMessageXml { get; }Public ReadOnly Property RedirectMessageXml As XmlDocument
Value
XmlDocument XmlDocument XmlDocument

The WISPr XML blob from the hotspot redirect message.

Attributes

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public byte[] WirelessNetworkId { get; }public byte[] WirelessNetworkId { get; }Public ReadOnly Property WirelessNetworkId As byte[]
Value
byte[] byte[] byte[]

A byte array that contains the SSID.

Attributes

Methods

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public void AbortAuthentication(Boolean markAsManual)public void AbortAuthentication(Boolean markAsManual)Public Function AbortAuthentication(markAsManual As Boolean) As void
Parameters
markAsManual
System.Boolean System.Boolean System.Boolean

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

Attributes

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)

Provides credentials to Windows for hotspot authentication

Note

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

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

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(String userName, String password, String extraParameters, Boolean 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
Parameters
userName
System.String System.String System.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
System.String System.String System.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
System.String System.String System.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
System.Boolean System.Boolean System.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.

Attributes

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)

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public IAsyncOperation<HotspotCredentialsAuthenticationResult> IssueCredentialsAsync(String userName, String password, String extraParameters, Boolean 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 )
Parameters
userName
System.String System.String System.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
System.String System.String System.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
System.String System.String System.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
System.Boolean System.Boolean System.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

Results of the Hotspot authentication request.

Attributes

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public void SkipAuthentication()public void SkipAuthentication()Public Function SkipAuthentication() As void
Attributes

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)

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

Windows will launch the specified application.

public void TriggerAttentionRequired(String packageRelativeApplicationId, String applicationParameters)public void TriggerAttentionRequired(String packageRelativeApplicationId, String applicationParameters)Public Function TriggerAttentionRequired(packageRelativeApplicationId As String, applicationParameters As String) As void
Parameters
packageRelativeApplicationId
System.String System.String System.String

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

applicationParameters
System.String System.String System.String

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

Attributes

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 app given privileged access by mobile network operators.

For permission to use this API, please reach out to Network Operators API Permissions.

For technical help with this API, please reach out to Network Operators API Help

public static bool TryGetAuthenticationContext(String evenToken, HotspotAuthenticationContext context)public static bool TryGetAuthenticationContext(String evenToken, HotspotAuthenticationContext context)Public Static Function TryGetAuthenticationContext(evenToken As String, context As HotspotAuthenticationContext) As bool
Parameters
evenToken
System.String System.String System.String

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

context
HotspotAuthenticationContext HotspotAuthenticationContext HotspotAuthenticationContext

The network operator hotspot authentication context.

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

Attributes