Avoid proxy authentication prompt

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Avoid proxy authentication prompt

Postby danesh » Fri Sep 05, 2014 9:11 am

Hi Guys.
I use CefRequestHandler --> GetAuthCredentials and the callback.Continue to pass username and password of proxy and it works fine BUT
it again asks user for username and password in a prompt window.
When I use callback.continue and return true --> it asks for user and pass (even if user cancel that it works fine but I want to avoid that prompt)
When I use callback.continue and return false --> it does not use the user and password and it does not ask user

Could you please help me
Thanks.
danesh
Newbie
 
Posts: 4
Joined: Fri Sep 05, 2014 8:59 am

Re: Avoid proxy authentication prompt

Postby magreenblatt » Fri Sep 05, 2014 9:30 am

What CEF version and OS?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Avoid proxy authentication prompt

Postby danesh » Fri Sep 05, 2014 9:40 am

Thank you so much for your prompt response.

Actually it happens when it use address directly from IE but I pass just the user and password.
If I pass the proxy address manually in commandLine.AppendSwitch it does not show that prompt.

Windows: Windows 7 Professional Service Pack 1
Cef version: 3.1650.1639
danesh
Newbie
 
Posts: 4
Joined: Fri Sep 05, 2014 8:59 am

Re: Avoid proxy authentication prompt

Postby magreenblatt » Fri Sep 05, 2014 9:44 am

danesh wrote:Actually it happens when it use address directly from IE but I pass just the user and password.

That sounds like you're getting the dialog from somewhere external to CEF. The only supported way of configuring proxy settings in CEF itself is via the command line.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Avoid proxy authentication prompt

Postby danesh » Fri Sep 05, 2014 9:55 am

For setting proxy address Yes but for authentication I use:
https://code.google.com/p/chromiumembed ... Resolution

Code: Select all
bool MyHandler::GetAuthCredentials(
    CefRefPtr<CefBrowser> browser,
    CefRefPtr<CefFrame> frame,
    bool isProxy,
    const CefString& host,
    int port,
    const CefString& realm,
    const CefString& scheme,
    CefRefPtr<CefAuthCallback> callback) {
  if (isProxy) {
    // Provide credentials for the proxy server connection.
    callback->Continue("myuser", "mypass");
    return true;
  }
  return false;
}


I mean when CEF use IE address (Not by passing with command line) and I pass the user & pass with this method it again asks for user and pass with a prompt.
danesh
Newbie
 
Posts: 4
Joined: Fri Sep 05, 2014 8:59 am

Re: Avoid proxy authentication prompt

Postby danesh » Fri Sep 05, 2014 10:48 am

Sorry
You are right :)
danesh
Newbie
 
Posts: 4
Joined: Fri Sep 05, 2014 8:59 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 61 guests