Table of Contents

Class CoreWebView2BasicAuthenticationRequestedEventArgs

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

Event args for the BasicAuthenticationRequested event. Will contain the request that led to the HTTP authorization challenge, the challenge and allows the host to provide authentication response or cancel the request.

public class CoreWebView2BasicAuthenticationRequestedEventArgs : EventArgs
Inheritance
CoreWebView2BasicAuthenticationRequestedEventArgs
Inherited Members

Properties

Cancel

Indicates whether to cancel the authentication request.

public bool Cancel { get; set; }

Property Value

bool

Remarks

false by default. If set to true, Response will be ignored.

Challenge

The authentication challenge string.

public string Challenge { get; }

Property Value

string

Response

Response to the authentication request with credentials.

public CoreWebView2BasicAuthenticationResponse Response { get; }

Property Value

CoreWebView2BasicAuthenticationResponse

Remarks

This object will be populated by the app if the host would like to provide authentication credentials.

Uri

The URI that led to the authentication challenge. For proxy authentication requests, this will be the URI of the proxy server.

public string Uri { get; }

Property Value

string

Methods

GetDeferral()

Gets a CoreWebView2Deferral object.

public CoreWebView2Deferral GetDeferral()

Returns

CoreWebView2Deferral

Remarks

Use this Deferral to defer the decision to show the Basic Authentication dialog.