From 2e90183cf7eb2b84d2952d5364acda88ec97681e Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 10 Sep 2003 21:39:06 +0000 Subject: Add "authenticate" and "reauthenticate" signals. (invalidate_auth): Remove * libsoup/soup-session.c: Add "authenticate" and "reauthenticate" signals. (invalidate_auth): Remove the call to soup_auth_invalidate. (authenticate_auth): soup_auth_fn is gone. If the URI doesn't contain authentication, then emit "authenticate" or "reauthenticate" (depending on whether or not this is the first time we've asked for a password for this auth). (update_auth_internal): If the server rejects our username/password, don't bail out immediately. Try doing a "reauthenticate" first. * libsoup/soup-misc.c (soup_set_authorize_callback): Gone * libsoup/soup-auth.c (soup_auth_new_from_header_list): Remove the "pref" arg. (soup_auth_invalidate): Remove this; it doesn't actually do anything useful for us. * libsoup/soup-auth-basic.c (invalidate): Remove * libsoup/soup-auth-digest.c: (invalidate): Remove * libsoup/soup-auth-ntlm.c: (invalidate): Remove * libsoup/soup-uri.c: Remove all references to "authmech". (soup_uri_set_auth): Remove this too. * tests/auth-test.c: Update to use the "authenticate" and "reauthenticate" signals instead of encoding usernames and passwords in the URIs. Add a few more test cases. --- libsoup/soup-auth-basic.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'libsoup/soup-auth-basic.c') diff --git a/libsoup/soup-auth-basic.c b/libsoup/soup-auth-basic.c index 78bcfb2b..a256fc5e 100644 --- a/libsoup/soup-auth-basic.c +++ b/libsoup/soup-auth-basic.c @@ -22,7 +22,6 @@ static void construct (SoupAuth *auth, const char *header); static GSList *get_protection_space (SoupAuth *auth, const SoupUri *source_uri); static const char *get_realm (SoupAuth *auth); static void authenticate (SoupAuth *auth, const char *username, const char *password); -static gboolean invalidate (SoupAuth *auth); static gboolean is_authenticated (SoupAuth *auth); static char *get_authorization (SoupAuth *auth, SoupMessage *msg); @@ -66,7 +65,6 @@ class_init (GObjectClass *object_class) auth_class->get_protection_space = get_protection_space; auth_class->get_realm = get_realm; auth_class->authenticate = authenticate; - auth_class->invalidate = invalidate; auth_class->is_authenticated = is_authenticated; auth_class->get_authorization = get_authorization; @@ -134,17 +132,6 @@ authenticate (SoupAuth *auth, const char *username, const char *password) g_free (user_pass); } -static gboolean -invalidate (SoupAuth *auth) -{ - SoupAuthBasic *basic = SOUP_AUTH_BASIC (auth); - - g_free (basic->priv->token); - basic->priv->token = NULL; - - return TRUE; -} - static gboolean is_authenticated (SoupAuth *auth) { -- cgit v1.2.1