Coherent UI supports proxy authentication via the basic authentication scheme, using username and password credentials.
To setup the proxy authentication you have to:
- Setup your system to use a proxy - for Windows that would be Control Panel -> Internet Options -> LAN Settings -> Proxy Server
- When initializing a View Context, in the
ContextSettings
enable the proxy support: ContextSettings ctxSettings;
ctxSettings.EnableProxy = true;
- Override the
Coherent::UI::ViewListener::OnGetAuthCredentials
method of your ViewListener. The interface of the method will provide you with information about the current authentication request.
- When you try to load a page and Coherent UI receives an Authentication Request from the proxy, the
OnGetAuthCredentials
callback will be called and the proxy username and password must be provided virtual void OnGetAuthCredentials(bool isProxy,
const wchar_t* host,
unsigned int port,
const wchar_t* realm,
const wchar_t* scheme)
{
View->AuthCredentialsResponse(L"user", L"password", true);
}