:, [if test $os_win32 = yes; then with_gnome=no; else with_gnome=yes; fi])
AC_MSG_RESULT($with_gnome)
-if test $with_gnome != no -a $os_win32 != yes; then
- PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1, :,
- AC_MSG_ERROR(
-[Could not find gnome-keyring devel files.
-Configure with --without-gnome if you wish to build only libsoup
-without GNOME-specific features.]))
-fi
-AC_SUBST(GNOME_KEYRING_CFLAGS)
-AC_SUBST(GNOME_KEYRING_LIBS)
-
AM_CONDITIONAL(BUILD_LIBSOUP_GNOME, test $with_gnome != no)
if test $with_gnome != no; then
if BUILD_LIBSOUP_GNOME
-if OS_WIN32
-soup_password_manager_gnome_files =
-else
-soup_password_manager_gnome_files = \
- soup-password-manager-gnome.h \
- soup-password-manager-gnome.c
-endif
-
libsoupgnomeincludedir = $(includedir)/libsoup-gnome-2.4/libsoup
libsoupgnomeinclude_HEADERS = \
libsoup_gnome_2_4_la_LIBADD = \
libsoup-2.4.la \
$(GLIB_LIBS) \
- $(SQLITE_LIBS) \
- $(GNOME_KEYRING_LIBS)
+ $(SQLITE_LIBS)
libsoup_gnome_2_4_la_SOURCES = \
soup-cookie-jar-sqlite.c \
soup-gnome-features.c \
soup-proxy-resolver-gnome.h \
soup-proxy-resolver-gnome.c \
- $(soup_password_manager_gnome_files)
+ soup-password-manager-gnome.h \
+ soup-password-manager-gnome.c
endif
#include <config.h>
#endif
-#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
#include <string.h>
#include "soup-auth.h"
typedef struct {
gboolean proxy;
char *host;
-
- GHashTable *saved_passwords;
} SoupAuthPrivate;
#define SOUP_AUTH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUP_TYPE_AUTH, SoupAuthPrivate))
G_DEFINE_ABSTRACT_TYPE (SoupAuth, soup_auth, G_TYPE_OBJECT)
enum {
- SAVE_PASSWORD,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-enum {
PROP_0,
PROP_SCHEME_NAME,
g_free (auth->realm);
g_free (priv->host);
- if (priv->saved_passwords)
- g_hash_table_destroy (priv->saved_passwords);
G_OBJECT_CLASS (soup_auth_parent_class)->finalize (object);
}
object_class->set_property = soup_auth_set_property;
object_class->get_property = soup_auth_get_property;
- /**
- * SoupAuth::save-password:
- * @auth: the auth
- * @username: the username to save
- * @password: the password to save
- *
- * Emitted to request that the @username/@password pair be
- * saved. If the session supports password-saving, it will
- * connect to this signal before emitting
- * #SoupSession::authenticate, so that it record the password
- * if requested by the caller.
- *
- * Since: 2.28
- **/
- signals[SAVE_PASSWORD] =
- g_signal_new ("save-password",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- 0, NULL, NULL,
- _soup_marshal_NONE__STRING_STRING,
- G_TYPE_NONE, 2,
- G_TYPE_STRING,
- G_TYPE_STRING);
-
/* properties */
/**
* SOUP_AUTH_SCHEME_NAME:
*
* Call this on an auth to authenticate it; normally this will cause
* the auth's message to be requeued with the new authentication info.
- *
- * This does not cause the password to be saved to persistent storage;
- * see soup_auth_save_password() for that.
**/
void
soup_auth_authenticate (SoupAuth *auth, const char *username, const char *password)
g_slist_free_full (space, g_free);
}
-/**
- * soup_auth_get_saved_users:
- * @auth: a #SoupAuth
- *
- * Gets a list of usernames for which a saved password is available.
- * (If the session is not configured to save passwords, this will
- * always be %NULL.)
- *
- * Return value: (transfer container): the list of usernames. You must
- * free the list with g_slist_free(), but do not free or modify the
- * contents.
- *
- * Since: 2.28
- **/
GSList *
soup_auth_get_saved_users (SoupAuth *auth)
{
- SoupAuthPrivate *priv;
- GSList *users;
-
- g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
-
- priv = SOUP_AUTH_GET_PRIVATE (auth);
- users = NULL;
-
- if (priv->saved_passwords) {
- GHashTableIter iter;
- gpointer key, value;
-
- g_hash_table_iter_init (&iter, priv->saved_passwords);
- while (g_hash_table_iter_next (&iter, &key, &value))
- users = g_slist_prepend (users, key);
- }
- return users;
+ return NULL;
}
-/**
- * soup_auth_get_saved_password:
- * @auth: a #SoupAuth
- * @user: a username from the list returned from
- * soup_auth_get_saved_users().
- *
- * Given a username for which @auth has a saved password, this returns
- * that password. If @auth doesn't have a passwords saved for @user, it
- * returns %NULL.
- *
- * Return value: the saved password, or %NULL.
- *
- * Since: 2.28
- **/
const char *
soup_auth_get_saved_password (SoupAuth *auth, const char *user)
{
- SoupAuthPrivate *priv;
-
- g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
- g_return_val_if_fail (user != NULL, NULL);
-
- priv = SOUP_AUTH_GET_PRIVATE (auth);
- if (!priv->saved_passwords)
- return NULL;
- return g_hash_table_lookup (priv->saved_passwords, user);
-}
-
-static void
-free_password (gpointer password)
-{
- memset (password, 0, strlen (password));
- g_free (password);
-}
-
-static inline void
-init_saved_passwords (SoupAuthPrivate *priv)
-{
- priv->saved_passwords = g_hash_table_new_full (
- g_str_hash, g_str_equal, g_free, free_password);
+ return NULL;
}
-/**
- * soup_auth_has_saved_password:
- * @auth: a #SoupAuth
- * @username: a username
- * @password: a password
- *
- * Updates @auth to be aware of an already-saved username/password
- * combination. This method <emphasis>does not</emphasis> cause the
- * given @username and @password to be saved; use
- * soup_auth_save_password() for that. (soup_auth_has_saved_password()
- * is an internal method, which is used by the code that actually
- * saves and restores the passwords.)
- *
- * Since: 2.28
- **/
void
soup_auth_has_saved_password (SoupAuth *auth, const char *username,
const char *password)
{
- SoupAuthPrivate *priv;
-
- g_return_if_fail (SOUP_IS_AUTH (auth));
- g_return_if_fail (username != NULL);
- g_return_if_fail (password != NULL);
-
- priv = SOUP_AUTH_GET_PRIVATE (auth);
-
- if (!priv->saved_passwords)
- init_saved_passwords (priv);
- g_hash_table_insert (priv->saved_passwords,
- g_strdup (username), g_strdup (password));
}
-/**
- * soup_auth_save_password:
- * @auth: a #SoupAuth
- * @username: the username provided by the user or client
- * @password: the password provided by the user or client
- *
- * Requests that the username/password pair be saved to whatever form
- * of persistent password storage the session supports.
- *
- * Since: 2.28
- **/
void
soup_auth_save_password (SoupAuth *auth, const char *username,
const char *password)
{
- g_return_if_fail (SOUP_IS_AUTH (auth));
- g_return_if_fail (username != NULL);
- g_return_if_fail (password != NULL);
-
- g_signal_emit (auth, signals[SAVE_PASSWORD], 0,
- username, password);
}
const char *soup_auth_get_realm (SoupAuth *auth);
char *soup_auth_get_info (SoupAuth *auth);
-#ifdef LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-SOUP_AVAILABLE_IN_2_28
-GSList *soup_auth_get_saved_users (SoupAuth *auth);
-SOUP_AVAILABLE_IN_2_28
-const char *soup_auth_get_saved_password (SoupAuth *auth,
- const char *user);
-SOUP_AVAILABLE_IN_2_28
-void soup_auth_save_password (SoupAuth *auth,
- const char *username,
- const char *password);
-#endif
-
void soup_auth_authenticate (SoupAuth *auth,
const char *username,
const char *password);
void soup_auth_free_protection_space (SoupAuth *auth,
GSList *space);
-#ifdef LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-void soup_auth_has_saved_password (SoupAuth *auth,
- const char *username,
- const char *password);
-#endif
-
/* The actual auth types, which can be added/removed as features */
#define SOUP_TYPE_AUTH_BASIC (soup_auth_basic_get_type ())
#define SOUP_TYPE_AUTH_NTLM (soup_auth_ntlm_get_type ())
GType soup_auth_ntlm_get_type (void);
+/* Deprecated SoupPasswordManager-related APIs: all are now no-ops */
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
+GSList *soup_auth_get_saved_users (SoupAuth *auth);
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
+const char *soup_auth_get_saved_password (SoupAuth *auth,
+ const char *user);
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
+void soup_auth_save_password (SoupAuth *auth,
+ const char *username,
+ const char *password);
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
+void soup_auth_has_saved_password (SoupAuth *auth,
+ const char *username,
+ const char *password);
+
G_END_DECLS
#endif /* SOUP_AUTH_H */
GType soup_gnome_features_2_26_get_type (void);
#define SOUP_TYPE_GNOME_FEATURES_2_26 (soup_gnome_features_2_26_get_type ())
-#ifndef G_OS_WIN32
-#ifdef LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
GType soup_password_manager_gnome_get_type (void);
#define SOUP_TYPE_PASSWORD_MANAGER_GNOME (soup_password_manager_gnome_get_type ())
-#endif /* LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY */
-#endif
G_END_DECLS
* Copyright (C) 2008 Red Hat, Inc.
*/
+/* This is just a stub now; eventually it will go away completely. */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <gnome-keyring.h>
-
-#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
#include "soup-password-manager-gnome.h"
#include "soup.h"
-static void soup_password_manager_gnome_interface_init (SoupPasswordManagerInterface *password_manager_interface);
-
G_DEFINE_TYPE_EXTENDED (SoupPasswordManagerGNOME, soup_password_manager_gnome, G_TYPE_OBJECT, 0,
- G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, NULL)
- G_IMPLEMENT_INTERFACE (SOUP_TYPE_PASSWORD_MANAGER, soup_password_manager_gnome_interface_init))
+ G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, NULL))
static void
soup_password_manager_gnome_init (SoupPasswordManagerGNOME *manager_gnome)
{
}
-
-static void
-save_password_callback (GnomeKeyringResult result, guint32 val, gpointer data)
-{
-}
-
-static void
-async_save_password (SoupAuth *auth, const char *username,
- const char *password, gpointer user_data)
-{
- SoupURI *uri = user_data;
-
- gnome_keyring_set_network_password (
- NULL, /* use default keyring */
- username,
- soup_auth_get_realm (auth),
- uri->host,
- NULL,
- uri->scheme,
- soup_auth_get_scheme_name (auth),
- uri->port,
- password,
- save_password_callback, NULL, NULL);
-}
-
-static void
-sync_save_password (SoupAuth *auth, const char *username,
- const char *password, gpointer user_data)
-{
- SoupURI *uri = user_data;
- guint32 item_id;
-
- gnome_keyring_set_network_password_sync (
- NULL, /* use default keyring */
- username,
- soup_auth_get_realm (auth),
- uri->host,
- NULL,
- uri->scheme,
- soup_auth_get_scheme_name (auth),
- uri->port,
- password,
- &item_id);
-}
-
-static void
-update_auth_for_passwords (SoupAuth *auth, SoupMessage *msg,
- GList *passwords, gboolean async)
-{
- GnomeKeyringNetworkPasswordData *pdata;
- SoupURI *uri;
-
- while (passwords) {
- pdata = passwords->data;
- soup_auth_has_saved_password (auth, pdata->user,
- pdata->password);
- passwords = passwords->next;
- }
-
- uri = g_object_get_data (G_OBJECT (auth),
- "SoupPasswordManagerGNOME-save_password-uri");
- if (uri) {
- g_signal_handlers_disconnect_by_func (auth, async_save_password, uri);
- g_signal_handlers_disconnect_by_func (auth, sync_save_password, uri);
- }
-
- uri = soup_uri_copy (soup_message_get_uri (msg));
- g_signal_connect (auth, "save_password",
- G_CALLBACK (async ? async_save_password : sync_save_password),
- uri);
- g_object_set_data_full (G_OBJECT (auth),
- "SoupPasswordManagerGNOME-save_password-uri",
- uri, (GDestroyNotify)soup_uri_free);
-}
-
-typedef struct {
- SoupPasswordManager *password_manager;
- SoupMessage *msg;
- SoupAuth *auth;
- gboolean retrying;
-
- SoupPasswordManagerCallback callback;
- gpointer user_data;
-
- gpointer request;
-} SoupPasswordManagerGNOMEAuthData;
-
-static void
-find_password_callback (GnomeKeyringResult result, GList *list,
- gpointer user_data)
-{
- SoupPasswordManagerGNOMEAuthData *auth_data = user_data;
-
- /* FIXME: check result? */
-
- update_auth_for_passwords (auth_data->auth, auth_data->msg, list, TRUE);
- auth_data->callback (auth_data->password_manager,
- auth_data->msg, auth_data->auth,
- auth_data->retrying, auth_data->user_data);
-
- /* gnome-keyring will call free_auth_data to clean up for us. */
-}
-
-static void
-free_auth_data (gpointer data)
-{
- SoupPasswordManagerGNOMEAuthData *auth_data = data;
-
- g_object_unref (auth_data->auth);
- g_object_unref (auth_data->msg);
- g_slice_free (SoupPasswordManagerGNOMEAuthData, auth_data);
-}
-
-static void
-soup_password_manager_gnome_get_passwords_async (SoupPasswordManager *password_manager,
- SoupMessage *msg,
- SoupAuth *auth,
- gboolean retrying,
- GMainContext *async_context,
- GCancellable *cancellable,
- SoupPasswordManagerCallback callback,
- gpointer user_data)
-{
- SoupPasswordManagerGNOMEAuthData *auth_data;
- SoupURI *uri = soup_message_get_uri (msg);
-
- auth_data = g_slice_new (SoupPasswordManagerGNOMEAuthData);
- auth_data->password_manager = password_manager;
- auth_data->msg = g_object_ref (msg);
- auth_data->auth = g_object_ref (auth);
- auth_data->retrying = retrying;
-
- /* FIXME: async_context, cancellable */
-
- auth_data->callback = callback;
- auth_data->user_data = user_data;
-
- /* FIXME: should we be specifying protocol and port here, or
- * leaving them NULL/0 and filtering results in the callback?
- * We don't want to send https passwords to http, but the
- * reverse might be OK (if that's how other clients tend to
- * behave).
- */
- auth_data->request = gnome_keyring_find_network_password (
- NULL, /* user -- accept any */
- soup_auth_get_realm (auth), /* domain */
- uri->host, /* server */
- NULL, /* object -- unused */
- uri->scheme, /* protocol */
- soup_auth_get_scheme_name (auth), /* authtype */
- uri->port, /* port */
- find_password_callback, auth_data, free_auth_data);
-}
-
-static void
-soup_password_manager_gnome_get_passwords_sync (SoupPasswordManager *password_manager,
- SoupMessage *msg,
- SoupAuth *auth,
- GCancellable *cancellable)
-{
- SoupURI *uri = soup_message_get_uri (msg);
- GList *results = NULL;
-
- /* FIXME: cancellable */
-
- gnome_keyring_find_network_password_sync (
- NULL, /* user -- accept any */
- soup_auth_get_realm (auth), /* domain */
- uri->host, /* server */
- NULL, /* object -- unused */
- uri->scheme, /* protocol */
- soup_auth_get_scheme_name (auth), /* authtype */
- uri->port, /* port */
- &results);
-
- update_auth_for_passwords (auth, msg, results, FALSE);
-}
-
static void
soup_password_manager_gnome_class_init (SoupPasswordManagerGNOMEClass *gnome_class)
{
}
-
-static void
-soup_password_manager_gnome_interface_init (SoupPasswordManagerInterface *password_manager_interface)
-{
- password_manager_interface->get_passwords_async =
- soup_password_manager_gnome_get_passwords_async;
- password_manager_interface->get_passwords_sync =
- soup_password_manager_gnome_get_passwords_sync;
-}
#include <config.h>
#endif
-#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
#include "soup-password-manager.h"
#include "soup.h"
{
}
-/**
- * soup_password_manager_get_passwords_async:
- * @password_manager: the #SoupPasswordManager
- * @msg: the #SoupMessage being authenticated
- * @auth: the #SoupAuth being authenticated
- * @retrying: whether or not this is a re-attempt to authenticate
- * @async_context: (allow-none): the #GMainContext to invoke @callback in
- * @cancellable: a #GCancellable, or %NULL
- * @callback: callback to invoke after fetching passwords
- * @user_data: data for @callback
- *
- * Asynchronously attempts to look up saved passwords for @auth/@msg
- * and then calls @callback after updating @auth with the information.
- * Also registers @auth with @password_manager so that if the caller
- * calls soup_auth_save_password() on it, the password will be saved.
- *
- * #SoupPasswordManager does not actually use the @retrying flag itself;
- * it just passes its value on to @callback.
- *
- * If @cancellable is cancelled, @callback will still be invoked.
- *
- * Since: 2.28
- **/
void
soup_password_manager_get_passwords_async (SoupPasswordManager *password_manager,
SoupMessage *msg,
SoupPasswordManagerCallback callback,
gpointer user_data)
{
- SOUP_PASSWORD_MANAGER_GET_CLASS (password_manager)->
- get_passwords_async (password_manager, msg, auth, retrying,
- async_context, cancellable,
- callback, user_data);
+ g_warn_if_reached ();
}
-/**
- * soup_password_manager_get_passwords_sync:
- * @password_manager: the #SoupPasswordManager
- * @msg: the #SoupMessage being authenticated
- * @auth: the #SoupAuth being authenticated
- * @cancellable: a #GCancellable, or %NULL
- *
- * Synchronously attempts to look up saved passwords for @auth/@msg
- * and updates @auth with the information. Also registers @auth with
- * @password_manager so that if the caller calls
- * soup_auth_save_password() on it, the password will be saved.
- *
- * Since: 2.28
- **/
void
soup_password_manager_get_passwords_sync (SoupPasswordManager *password_manager,
SoupMessage *msg,
SoupAuth *auth,
GCancellable *cancellable)
{
- SOUP_PASSWORD_MANAGER_GET_CLASS (password_manager)->
- get_passwords_sync (password_manager, msg, auth, cancellable);
+ g_warn_if_reached ();
}
#ifndef SOUP_PASSWORD_MANAGER_H
#define SOUP_PASSWORD_MANAGER_H 1
-#ifdef LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
#include <libsoup/soup-types.h>
#define SOUP_TYPE_PASSWORD_MANAGER (soup_password_manager_get_type ())
} SoupPasswordManagerInterface;
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
GType soup_password_manager_get_type (void);
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
void soup_password_manager_get_passwords_async (SoupPasswordManager *password_manager,
SoupMessage *msg,
SoupAuth *auth,
SoupPasswordManagerCallback callback,
gpointer user_data);
+SOUP_AVAILABLE_IN_2_28
+SOUP_DEPRECATED_IN_2_28
void soup_password_manager_get_passwords_sync (SoupPasswordManager *password_manager,
SoupMessage *msg,
SoupAuth *auth,
GCancellable *cancellable);
-#endif /* LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY */
-
#endif /* SOUP_PASSWORD_MANAGER_H */
#include <config.h>
#endif
-#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
#include "soup-session-async.h"
#include "soup.h"
#include "soup-session-private.h"
}
static void
-got_passwords (SoupPasswordManager *password_manager, SoupMessage *msg,
- SoupAuth *auth, gboolean retrying, gpointer session)
-{
- soup_session_unpause_message (session, msg);
- SOUP_SESSION_CLASS (soup_session_async_parent_class)->
- auth_required (session, msg, auth, retrying);
- g_object_unref (auth);
-}
-
-static void
-soup_session_async_auth_required (SoupSession *session, SoupMessage *msg,
- SoupAuth *auth, gboolean retrying)
-{
- SoupSessionFeature *password_manager;
-
- password_manager = soup_session_get_feature_for_message (
- session, SOUP_TYPE_PASSWORD_MANAGER, msg);
- if (password_manager) {
- soup_session_pause_message (session, msg);
- g_object_ref (auth);
- soup_password_manager_get_passwords_async (
- SOUP_PASSWORD_MANAGER (password_manager),
- msg, auth, retrying,
- soup_session_get_async_context (session),
- NULL, /* FIXME cancellable */
- got_passwords, session);
- } else {
- SOUP_SESSION_CLASS (soup_session_async_parent_class)->
- auth_required (session, msg, auth, retrying);
- }
-}
-
-static void
soup_session_async_class_init (SoupSessionAsyncClass *soup_session_async_class)
{
SoupSessionClass *session_class = SOUP_SESSION_CLASS (soup_session_async_class);
session_class->queue_message = soup_session_async_queue_message;
session_class->send_message = soup_session_async_send_message;
session_class->cancel_message = soup_session_async_cancel_message;
- session_class->auth_required = soup_session_async_auth_required;
}
#include <config.h>
#endif
-#define LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY
-
#include "soup-session-sync.h"
#include "soup.h"
#include "soup-session-private.h"
}
static void
-soup_session_sync_auth_required (SoupSession *session, SoupMessage *msg,
- SoupAuth *auth, gboolean retrying)
-{
- SoupSessionFeature *password_manager;
-
- password_manager = soup_session_get_feature_for_message (
- session, SOUP_TYPE_PASSWORD_MANAGER, msg);
- if (password_manager) {
- soup_password_manager_get_passwords_sync (
- SOUP_PASSWORD_MANAGER (password_manager),
- msg, auth, NULL); /* FIXME cancellable */
- }
-
- SOUP_SESSION_CLASS (soup_session_sync_parent_class)->
- auth_required (session, msg, auth, retrying);
-}
-
-static void
soup_session_sync_class_init (SoupSessionSyncClass *session_sync_class)
{
SoupSessionClass *session_class = SOUP_SESSION_CLASS (session_sync_class);
/* virtual method override */
session_class->queue_message = soup_session_sync_queue_message;
session_class->send_message = soup_session_sync_send_message;
- session_class->auth_required = soup_session_sync_auth_required;
}
}
static void
-soup_session_real_auth_required (SoupSession *session, SoupMessage *msg,
- SoupAuth *auth, gboolean retrying)
-{
- g_signal_emit (session, signals[AUTHENTICATE], 0, msg, auth, retrying);
-}
-
-static void
auth_manager_authenticate (SoupAuthManager *manager, SoupMessage *msg,
SoupAuth *auth, gboolean retrying,
gpointer session)
{
- SOUP_SESSION_GET_CLASS (session)->auth_required (
- session, msg, auth, retrying);
+ g_signal_emit (session, signals[AUTHENTICATE], 0, msg, auth, retrying);
}
#define SOUP_SESSION_WOULD_REDIRECT_AS_GET(session, msg) \
/* virtual method definition */
session_class->requeue_message = soup_session_real_requeue_message;
session_class->cancel_message = soup_session_real_cancel_message;
- session_class->auth_required = soup_session_real_auth_required;
session_class->flush_queue = soup_session_real_flush_queue;
session_class->kick = soup_session_real_kick_queue;
#include <libsoup/soup-misc.h>
#include <libsoup/soup-multipart.h>
#include <libsoup/soup-multipart-input-stream.h>
-#include <libsoup/soup-password-manager.h>
#include <libsoup/soup-proxy-resolver.h>
#include <libsoup/soup-proxy-resolver-default.h>
#include <libsoup/soup-proxy-uri-resolver.h>