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
unsafe fn add_client_certificate_requested(
&self,
event_handler: *mut *mut ICoreWebView2ClientCertificateRequestedEventHandlerVTable,
token: *mut EventRegistrationToken
) -> HRESULT
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:
Scenario | Handled | Cancel | SelectedCertificate |
---|---|---|---|
Respond to server with a certificate | True | False | MutuallyTrustedCertificate value |
Respond to server without certificate | True | False | null |
Display default client certificate selection dialog prompt | False | False | n/a |
Cancel the request | n/a | True | n/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
unsafe fn remove_client_certificate_requested(
&self,
token: EventRegistrationToken
) -> HRESULT
unsafe fn remove_client_certificate_requested(
&self,
token: EventRegistrationToken
) -> HRESULT
Remove an event handler previously added with add_ClientCertificateRequested.
Trait Implementations
type VTable = ICoreWebView2_5VTable
type VTable = ICoreWebView2_5VTable
A COM compatible V-Table
type Super = dyn ICoreWebView2_4
type Super = dyn ICoreWebView2_4
The interface that this interface inherits from
Check whether a given IID is in the inheritance hierarchy of this interface