Trait webview2_sys::ICoreWebView2_5[][src]

pub trait ICoreWebView2_5: ICoreWebView2_4 {
    unsafe fn add_client_certificate_requested(
        &self,
        event_handler: *mut *mut ICoreWebView2ClientCertificateRequestedEventHandlerVTable,
        token: *mut EventRegistrationToken
    ) -> HRESULT;
unsafe fn remove_client_certificate_requested(
        &self,
        token: EventRegistrationToken
    ) -> HRESULT; }
Expand description

A continuation of the ICoreWebView2_4 interface to support ClientCertificateRequested event.

Required methods

Add an event handler for the ClientCertificateRequested event. The ClientCertificateRequested event is raised when the WebView2 is making a request to an HTTP server that needs a client certificate for HTTP authentication. Read more about HTTP client certificates at RFC 8446 The Transport Layer Security (TLS) Protocol Version 1.3.

With this event you have several options for responding to client certificate requests:

ScenarioHandledCancelSelectedCertificate
Respond to server with a certificateTrueFalseMutuallyTrustedCertificate value
Respond to server without certificateTrueFalsenull
Display default client certificate selection dialog promptFalseFalsen/a
Cancel the requestn/aTruen/a

If you don’t handle the event, WebView2 will show the default client certificate selection dialog prompt to user.

\snippet SettingsComponent.cpp ClientCertificateRequested1 \snippet ScenarioClientCertificateRequested.cpp ClientCertificateRequested2

Remove an event handler previously added with add_ClientCertificateRequested.

Trait Implementations

A COM compatible V-Table

The interface that this interface inherits from

The associated id for this interface

Check whether a given IID is in the inheritance hierarchy of this interface

Get the vtable for a particular COM interface

Implementations on Foreign Types

Implementors