diff options
author | Dan Winship <danw@src.gnome.org> | 2008-01-16 21:49:54 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2008-01-16 21:49:54 +0000 |
commit | 257e653516d9903f234c806cff36fa62aafdd8c0 (patch) | |
tree | 7186a71d07eb5387023310dea51410f139ef18f9 /docs | |
parent | b10240e62e619272231d1e72651864087fc04259 (diff) | |
download | libsoup-257e653516d9903f234c806cff36fa62aafdd8c0.tar.gz libsoup-257e653516d9903f234c806cff36fa62aafdd8c0.tar.bz2 libsoup-257e653516d9903f234c806cff36fa62aafdd8c0.zip |
Allow the session authenticate signal to be handled asynchronously, by
* libsoup/soup-auth-manager.c (authorize_handler, etc): Allow the
session authenticate signal to be handled asynchronously, by
pausing the message and then authenticating the auth later.
(auth_type_compare_func): make this work. oops.
(extract_challenge): plug leak
* libsoup/soup-auth-manager-ntlm.c: Make this work async too.
* libsoup/soup-headers.c (soup_header_parse_list):
(soup_header_parse_param_list): plug leaks
* tests/auth-test.c (do_async_auth_test): test async auth
* docs/reference/client-howto.xml (Handling Authentication):
mention async auth
svn path=/trunk/; revision=1045
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/client-howto.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/reference/client-howto.xml b/docs/reference/client-howto.xml index c52f6353..23aa675b 100644 --- a/docs/reference/client-howto.xml +++ b/docs/reference/client-howto.xml @@ -345,6 +345,19 @@ at which point <application>libsoup</application> will allow the message to fail (with status 401 or 407). </para> +<para> +If you need to handle authentication asynchronously (eg, to pop up a +password dialog without recursively entering the main loop), you can +do that as well. Just call <link +linkend="soup-session-pause-message"><function>soup_session_pause_message</function></link> +on the message before returning from the signal handler, and +<function>g_object_ref</function> the <type>SoupAuth</type>. Then, +later on, after calling <function>soup_auth_authenticate</function> +(or deciding not to), call <link +linkend="soup-session-unpause-message"><function>soup_session_unpause_message</function></link> +to resume the paused message. +</para> + </refsect2> <refsect2> |