[gnome-online-accounts/wip/rishi/kerberos: 1/2] identity: Add Renew to org.gnome.Identity.Manager
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/kerberos: 1/2] identity: Add Renew to org.gnome.Identity.Manager
- Date: Wed, 16 Nov 2016 17:45:25 +0000 (UTC)
commit 7448afbb1dfb4e9887c21964bf35d6d9a7070956
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Aug 1 12:10:38 2016 +0200
identity: Add Renew to org.gnome.Identity.Manager
In a subsequent commit, we will use this to offer a button to
explicitly renew Kerberos tickets from the UI.
https://bugzilla.gnome.org/show_bug.cgi?id=769267
src/goaidentity/goaidentityservice.c | 29 +++++++++++++++++++++++++++++
src/goaidentity/org.gnome.Identity.xml | 10 ++++++++++
2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/src/goaidentity/goaidentityservice.c b/src/goaidentity/goaidentityservice.c
index 6f0fd60..47afafc 100644
--- a/src/goaidentity/goaidentityservice.c
+++ b/src/goaidentity/goaidentityservice.c
@@ -278,6 +278,34 @@ ensure_account_credentials (GoaIdentityService *self,
self);
}
+static gboolean
+goa_identity_service_handle_renew (GoaIdentityServiceManager *manager,
+ GDBusMethodInvocation *invocation,
+ const char *identifier,
+ GVariant *details)
+{
+ GoaIdentityService *self = GOA_IDENTITY_SERVICE (manager);
+ GTask *task;
+
+ task = g_task_new (self, NULL, NULL, NULL);
+ g_task_set_task_data (self, g_object_ref (invocation), g_object_ref);
+
+ goa_identity_manager_get_identity (GOA_IDENTITY_MANAGER (self->priv->identity_manager),
+ identifier,
+ NULL,
+ (GAsyncReadyCallback) on_got_identity_for_renew,
+ self);
+
+ goa_identity_manager_renew_identity (GOA_IDENTITY_MANAGER (self->priv->identity_manager),
+ identity,
+ NULL,
+ (GAsyncReadyCallback)
+ on_identity_renewed,
+ self);
+
+ return TRUE;
+}
+
static void
on_sign_in_handled (GoaIdentityService *self,
GAsyncResult *result,
@@ -653,6 +681,7 @@ goa_identity_service_handle_exchange_secret_keys (GoaIdentityServiceManager *man
static void
identity_service_manager_interface_init (GoaIdentityServiceManagerIface *interface)
{
+ interface->handle_renew = goa_identity_service_handle_renew;
interface->handle_sign_in = goa_identity_service_handle_sign_in;
interface->handle_sign_out = goa_identity_service_handle_sign_out;
interface->handle_exchange_secret_keys = goa_identity_service_handle_exchange_secret_keys;
diff --git a/src/goaidentity/org.gnome.Identity.xml b/src/goaidentity/org.gnome.Identity.xml
index 2f612d1..eec3071 100644
--- a/src/goaidentity/org.gnome.Identity.xml
+++ b/src/goaidentity/org.gnome.Identity.xml
@@ -34,6 +34,16 @@
</method>
<!--
+ Renew:
+ @identifier: The identifier of the identity (i.e., a kerberos principal name)
+
+ Renews an identity.
+ -->
+ <method name="Renew">
+ <arg name="identifier" type="s" direction="in"/>
+ </method>
+
+ <!--
SignIn:
@identifier: kerberos principal or partial principal
@details: Extra key/value pairs to set.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]