Table of Contents

Class CoreWebView2ClientCertificateRequestedEventArgs

Namespace
Microsoft.Web.WebView2.Core
Assembly
Microsoft.Web.WebView2.Core.dll

Event args for the ClientCertificateRequested event.

public class CoreWebView2ClientCertificateRequestedEventArgs : EventArgs
Inheritance
CoreWebView2ClientCertificateRequestedEventArgs
Inherited Members

Properties

AllowedCertificateAuthorities

The list contains Base64 encoding of DER encoded distinguished names of certificate authorities allowed by the server.

public IReadOnlyList<string> AllowedCertificateAuthorities { get; }

Property Value

IReadOnlyList<string>

Cancel

Indicates whether to cancel the certificate selection.

public bool Cancel { get; set; }

Property Value

bool

Remarks

If canceled, the request is aborted regardless of the Handled property. By default the value is false.

Handled

Indicates whether the event has been handled by host.

public bool Handled { get; set; }

Property Value

bool

Remarks

Set to true to respond to the server with or without a certificate. If this flag is true with a SelectedCertificate it responds to the server with the selected certificate otherwise respond to the server without a certificate. By default the value of Handled and Cancel are false and display default client certificate selection dialog prompt to allow the user to choose a certificate. The SelectedCertificate is ignored unless Handled is set to true.

Host

Returns host name of the server that requested client certificate authentication.

public string Host { get; }

Property Value

string

Remarks

Normalization rules applied to the hostname are:

  • Convert to lowercase characters for ascii characters.
  • Punycode is used for representing non ascii characters.
  • Strip square brackets for IPV6 address.

IsProxy

Returns true if the server that issued this request is an http proxy. Returns false if the server is the origin server.

public bool IsProxy { get; }

Property Value

bool

MutuallyTrustedCertificates

Returns the list of CoreWebView2ClientCertificate when client certificate authentication is requested. The list contains mutually trusted CA certificate.

public IReadOnlyList<CoreWebView2ClientCertificate> MutuallyTrustedCertificates { get; }

Property Value

IReadOnlyList<CoreWebView2ClientCertificate>

Port

Returns port of the server that requested client certificate authentication.

public int Port { get; }

Property Value

int

SelectedCertificate

Selected certificate to respond to the server.

public CoreWebView2ClientCertificate SelectedCertificate { get; set; }

Property Value

CoreWebView2ClientCertificate

Methods

GetDeferral()

Gets a CoreWebView2Deferral object.

public CoreWebView2Deferral GetDeferral()

Returns

CoreWebView2Deferral

Remarks

Use this to Complete() the event at a later time.