From 876d3f9ecfd4732f2e61564ba016eb840dff8b89 Mon Sep 17 00:00:00 2001 From: Nick <26008462+vwmberry95@users.noreply.github.com> Date: Sun, 17 Nov 2019 21:13:30 -0500 Subject: [PATCH] Add IRequestContext.ClearHttpAuthCredentials (#2959) Add IRequestContext.ClearHttpAuthCredentials --- CefSharp.Core/RequestContext.cpp | 9 +++++++++ CefSharp.Core/RequestContext.h | 8 ++++++++ CefSharp/IRequestContext.cs | 8 ++++++++ 3 files changed, 25 insertions(+) diff --git a/CefSharp.Core/RequestContext.cpp b/CefSharp.Core/RequestContext.cpp index bae40d736..1468b15c2 100644 --- a/CefSharp.Core/RequestContext.cpp +++ b/CefSharp.Core/RequestContext.cpp @@ -145,6 +145,15 @@ namespace CefSharp _requestContext->ClearCertificateExceptions(wrapper); } + void RequestContext::ClearHttpAuthCredentials(ICompletionCallback^ callback) + { + ThrowIfDisposed(); + + CefRefPtr wrapper = callback == nullptr ? NULL : new CefCompletionCallbackAdapter(callback); + + _requestContext->ClearHttpAuthCredentials(wrapper); + } + void RequestContext::CloseAllConnections(ICompletionCallback^ callback) { ThrowIfDisposed(); diff --git a/CefSharp.Core/RequestContext.h b/CefSharp.Core/RequestContext.h index 31752cf2d..0906ac849 100644 --- a/CefSharp.Core/RequestContext.h +++ b/CefSharp.Core/RequestContext.h @@ -284,6 +284,14 @@ namespace CefSharp /// completion. This param is optional virtual void ClearCertificateExceptions(ICompletionCallback^ callback); + /// + /// Clears all HTTP authentication credentials that were added as part of handling + /// . + /// + /// If is non-NULL it will be executed on the CEF UI thread after + /// completion. This param is optional + virtual void ClearHttpAuthCredentials(ICompletionCallback^ callback); + /// /// Clears all active and idle connections that Chromium currently has. /// This is only recommended if you have released all other CEF objects but diff --git a/CefSharp/IRequestContext.cs b/CefSharp/IRequestContext.cs index fb810f8d6..46f8bbb1e 100644 --- a/CefSharp/IRequestContext.cs +++ b/CefSharp/IRequestContext.cs @@ -172,6 +172,14 @@ namespace CefSharp /// completion. This param is optional void ClearCertificateExceptions(ICompletionCallback callback); + /// + /// Clears all HTTP authentication credentials that were added as part of handling + /// . + /// + /// If is non-NULL it will be executed on the CEF UI thread after + /// completion. This param is optional + void ClearHttpAuthCredentials(ICompletionCallback callback); + /// /// Clears all active and idle connections that Chromium currently has. /// This is only recommended if you have released all other CEF objects but