public override void OnReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, string host, string realm) { if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password)) { handler.Proceed(Username, Password); } else { base.OnReceivedHttpAuthRequest(view, handler, host, realm); } }
public override void OnReceivedHttpAuthRequest(Android.Webkit.WebView view, HttpAuthHandler handler, string host, string realm) { if (Reference == null || !Reference.TryGetTarget(out FormsWebViewRenderer renderer)) { return; } if (renderer.Element == null) { return; } if (!string.IsNullOrEmpty(renderer.Element.Username) && !string.IsNullOrEmpty(renderer.Element.Password)) { handler.Proceed(renderer.Element.Username, renderer.Element.Password); } }
public override void OnReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, string host, string realm) { //base.OnReceivedHttpAuthRequest (view, handler, host, realm); handler.Proceed("admin", "123456"); }