VpnChannel.RequestCredentialsAsync 方法

定义

重载

RequestCredentialsAsync(VpnCredentialType)

请求 VPN 平台从用户收集给定凭据类型的凭据。

RequestCredentialsAsync(VpnCredentialType, UInt32)

请求 VPN 平台从用户收集凭据。 插件可以指定要收集的凭据的类型和形式。 结果是一个对象,其中包含主要凭据,具体取决于类型,以及更改和过期情况的辅助凭据。

RequestCredentialsAsync(VpnCredentialType, UInt32, Certificate)

用于从用户收集凭据的 VPN 平台。 如果需要用户交互才能获取凭据或同意,平台将提供必要的用户交互。 VPN 插件在使用任何类型的凭据之前必须请求凭据,即使意图不为其调用用户交互也是如此。

RequestCredentialsAsync(VpnCredentialType)

请求 VPN 平台从用户收集给定凭据类型的凭据。

public:
 virtual IAsyncOperation<VpnCredential ^> ^ RequestCredentialsAsync(VpnCredentialType credType) = RequestCredentialsAsync;
/// [Windows.Foundation.Metadata.Overload("RequestCredentialsSimpleAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VpnCredential> RequestCredentialsAsync(VpnCredentialType const& credType);
[Windows.Foundation.Metadata.Overload("RequestCredentialsSimpleAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VpnCredential> RequestCredentialsAsync(VpnCredentialType credType);
function requestCredentialsAsync(credType)
Public Function RequestCredentialsAsync (credType As VpnCredentialType) As IAsyncOperation(Of VpnCredential)

参数

credType
VpnCredentialType

一个枚举值,指示要收集的凭据的类型。

返回

VpnCredential 对象的异步检索操作,其中包含所请求类型的主要凭据,以及更改和过期情况的辅助凭据。

属性

Windows 要求

应用功能
networkingVpnProvider

另请参阅

适用于

RequestCredentialsAsync(VpnCredentialType, UInt32)

请求 VPN 平台从用户收集凭据。 插件可以指定要收集的凭据的类型和形式。 结果是一个对象,其中包含主要凭据,具体取决于类型,以及更改和过期情况的辅助凭据。

public:
 virtual IAsyncOperation<VpnCredential ^> ^ RequestCredentialsAsync(VpnCredentialType credType, unsigned int credOptions) = RequestCredentialsAsync;
/// [Windows.Foundation.Metadata.Overload("RequestCredentialsWithOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VpnCredential> RequestCredentialsAsync(VpnCredentialType const& credType, uint32_t const& credOptions);
[Windows.Foundation.Metadata.Overload("RequestCredentialsWithOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VpnCredential> RequestCredentialsAsync(VpnCredentialType credType, uint credOptions);
function requestCredentialsAsync(credType, credOptions)
Public Function RequestCredentialsAsync (credType As VpnCredentialType, credOptions As UInteger) As IAsyncOperation(Of VpnCredential)

参数

credType
VpnCredentialType

一个枚举值,指示要收集的凭据的类型。

credOptions
UInt32

unsigned int

uint32_t

指定用于定义请求凭据是重试事例还是应用于单一登录的值。

有关可能的值,请参阅 VpnChannelRequestCredentialsOptions

返回

VpnCredential 对象的异步检索操作,其中包含所请求类型的主要凭据,以及更改和过期情况的辅助凭据。

属性

Windows 要求

应用功能
networkingVpnProvider

另请参阅

适用于

RequestCredentialsAsync(VpnCredentialType, UInt32, Certificate)

用于从用户收集凭据的 VPN 平台。 如果需要用户交互才能获取凭据或同意,平台将提供必要的用户交互。 VPN 插件在使用任何类型的凭据之前必须请求凭据,即使意图不为其调用用户交互也是如此。

public:
 virtual IAsyncOperation<VpnCredential ^> ^ RequestCredentialsAsync(VpnCredentialType credType, unsigned int credOptions, Certificate ^ certificate) = RequestCredentialsAsync;
/// [Windows.Foundation.Metadata.Overload("RequestCredentialsWithCertificateAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<VpnCredential> RequestCredentialsAsync(VpnCredentialType const& credType, uint32_t const& credOptions, Certificate const& certificate);
[Windows.Foundation.Metadata.Overload("RequestCredentialsWithCertificateAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<VpnCredential> RequestCredentialsAsync(VpnCredentialType credType, uint credOptions, Certificate certificate);
function requestCredentialsAsync(credType, credOptions, certificate)
Public Function RequestCredentialsAsync (credType As VpnCredentialType, credOptions As UInteger, certificate As Certificate) As IAsyncOperation(Of VpnCredential)

参数

credType
VpnCredentialType

一个枚举值,指示要收集的凭据的类型。

credOptions
UInt32

unsigned int

uint32_t

指定用于定义请求凭据是重试事例还是应用于单一登录的值。

有关可能的值,请参阅 VpnChannelRequestCredentialsOptions

certificate
Certificate

用于验证凭据的证书。

返回

VpnCredential 对象的异步检索操作,其中包含所请求类型的主要凭据,以及更改和过期情况的辅助凭据。

属性

Windows 要求

应用功能
networkingVpnProvider

另请参阅

适用于