[evolution-data-server] ESoupAuthBearer: Implement two more SoupAuth virtual methods
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] ESoupAuthBearer: Implement two more SoupAuth virtual methods
- Date: Thu, 21 Apr 2022 09:12:32 +0000 (UTC)
commit 836923a04ae08ee9bee2323e79b4c910ba4b8134
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 21 11:09:12 2022 +0200
ESoupAuthBearer: Implement two more SoupAuth virtual methods
The can_authenticate() is to let the libsoup know this one cannot be
authenticated with a username+password.
The authenticate() is implemented just in case.
Both had been faced while testing with libsoup3, but can be used
with the libsoup2 as well.
src/libedataserver/e-soup-auth-bearer.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/src/libedataserver/e-soup-auth-bearer.c b/src/libedataserver/e-soup-auth-bearer.c
index 78fd1313b..46b2bcf5f 100644
--- a/src/libedataserver/e-soup-auth-bearer.c
+++ b/src/libedataserver/e-soup-auth-bearer.c
@@ -145,6 +145,20 @@ e_soup_auth_bearer_get_authorization (SoupAuth *auth,
return res;
}
+static gboolean
+e_soup_auth_bearer_can_authenticate (SoupAuth *auth)
+{
+ return FALSE;
+}
+
+static void
+e_soup_auth_bearer_authenticate (SoupAuth *auth,
+ const gchar *username,
+ const gchar *password)
+{
+ /* Not applicable here */
+}
+
static void
e_soup_auth_bearer_class_init (ESoupAuthBearerClass *class)
{
@@ -164,6 +178,8 @@ e_soup_auth_bearer_class_init (ESoupAuthBearerClass *class)
auth_class->get_protection_space = e_soup_auth_bearer_get_protection_space;
auth_class->is_authenticated = e_soup_auth_bearer_is_authenticated;
auth_class->get_authorization = e_soup_auth_bearer_get_authorization;
+ auth_class->can_authenticate = e_soup_auth_bearer_can_authenticate;
+ auth_class->authenticate = e_soup_auth_bearer_authenticate;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]