ICoreWebView2_5

Trait ICoreWebView2_5 

Source
pub trait ICoreWebView2_5: ICoreWebView2_4 {
    // Required methods
    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§

Source

unsafe fn add_client_certificate_requested( &self, event_handler: *mut *mut ICoreWebView2ClientCertificateRequestedEventHandlerVTable, token: *mut EventRegistrationToken, ) -> HRESULT

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

Source

unsafe fn remove_client_certificate_requested( &self, token: EventRegistrationToken, ) -> HRESULT

Remove an event handler previously added with add_ClientCertificateRequested.

Trait Implementations§

Source§

impl ComInterface for dyn ICoreWebView2_5

Source§

const IID: IID = IID_ICORE_WEB_VIEW2_5

The associated id for this interface
Source§

type VTable = ICoreWebView2_5VTable

A COM compatible V-Table
Source§

type Super = dyn ICoreWebView2_4

The interface that this interface inherits from
Source§

fn is_iid_in_inheritance_chain(riid: &GUID) -> bool

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

impl<C: ICoreWebView2_5> ProductionComInterface<C> for dyn ICoreWebView2_5

Source§

fn vtable<O: Offset>() -> Self::VTable

Get the vtable for a particular COM interface

Implementations on Foreign Types§

Source§

impl<T: ICoreWebView2_5 + ComInterface + ?Sized> ICoreWebView2_5 for ComPtr<T>

Source§

impl<T: ICoreWebView2_5 + ComInterface + ?Sized> ICoreWebView2_5 for ComRc<T>

Implementors§