[libgovirt] Use persistent authentication
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Use persistent authentication
- Date: Wed, 16 Apr 2014 16:22:22 +0000 (UTC)
commit 63ba74bb7d4da74a5a0f865cd88ae2118060696e
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Dec 12 14:52:08 2013 +0100
Use persistent authentication
Now that we can handle cookies in the HTTP session with the oVirt engine,
we can set the Prefer: persistent-auth header so that the user is not
being asked for a password for every REST request.
govirt/ovirt-action-rest-call.c | 2 ++
govirt/ovirt-rest-call.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/govirt/ovirt-action-rest-call.c b/govirt/ovirt-action-rest-call.c
index a4bf7c4..e59c73b 100644
--- a/govirt/ovirt-action-rest-call.c
+++ b/govirt/ovirt-action-rest-call.c
@@ -97,6 +97,8 @@ OvirtActionRestCall *ovirt_action_rest_call_new(RestProxy *proxy)
} else {
rest_proxy_call_add_header(REST_PROXY_CALL(call), "Filter", "true");
}
+ rest_proxy_call_add_header(REST_PROXY_CALL(call),
+ "Prefer", "persistent-auth");
return call;
}
diff --git a/govirt/ovirt-rest-call.c b/govirt/ovirt-rest-call.c
index 42c6a51..e5ff47d 100644
--- a/govirt/ovirt-rest-call.c
+++ b/govirt/ovirt-rest-call.c
@@ -130,6 +130,8 @@ static void ovirt_rest_call_constructed(GObject *object)
} else {
rest_proxy_call_add_header(REST_PROXY_CALL(object), "Filter", "true");
}
+ rest_proxy_call_add_header(REST_PROXY_CALL(object),
+ "Prefer", "persistent-auth");
g_object_unref(proxy);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]