[webkit-gtk] Authentication dialog API

Brian Holt brian.holt at samsung.com
Fri Jul 26 04:11:51 PDT 2013


Apache has some documentation for HTTP authentication that may well be of assistance to the design of this API: https://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html.

What I found interesting is the ability to set the authentication scope as well as the username and password e.g.

credsProvider.setCredentials(
    new AuthScope("otherhost", 8080, AuthScope.ANY_REALM, "ntlm"), 
    new UsernamePasswordCredentials("u3", "p3"));

Do you think it would be useful to create another boxed type called WebKitAuthenticationScope would contain the host, port, realm, etc by wrapping a WebCore::ProtectionSpace.

Authentication might then look as follows:

WEBKIT_API void
webkit_authentication_request_authenticate             (WebKitAuthenticationRequest *request,
                                                        WebKitCredential            *credential,
                                                        WebKitAuthenticationScope   *scope);

I do realise that the AuthenticationDecisionListener doesn't support setting the scope, so maybe this is premature.  But I think its worthwhile having the discussion.

Regards
Brian




More information about the webkit-gtk mailing list