[krb5-auth-dialog] Add acquire ticket and destroy ccache via DBus examples



commit 345521f0e3bd7e3ba0b9975da9db70702aec60e4
Author: Guido Günther <agx sigxcpu org>
Date:   Sun Feb 27 15:43:16 2011 +0100

    Add acquire ticket and destroy ccache via DBus examples

 examples/Makefile.am       |    2 ++
 examples/destroy-ccache.py |    8 ++++++++
 examples/tgt-acquire.py    |    8 ++++++++
 3 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/examples/Makefile.am b/examples/Makefile.am
index c0d930a..529f035 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -2,4 +2,6 @@ NULL =
 
 EXTRA_DIST = \
 	tgt-signals.py \
+	tgt-acquire.py \
+	destroy-ccache.py \
 	$(NULL)
diff --git a/examples/destroy-ccache.py b/examples/destroy-ccache.py
new file mode 100644
index 0000000..33cb20c
--- /dev/null
+++ b/examples/destroy-ccache.py
@@ -0,0 +1,8 @@
+import dbus
+
+bus = dbus.SessionBus()
+ka = bus.get_object('org.gnome.KrbAuthDialog',
+                    '/org/gnome/KrbAuthDialog')
+ret = ka.destroyCCache(dbus_interface='org.gnome.KrbAuthDialog')
+if not ret:
+    print >>sys.stderr, "Could not destroy credentials cache"
diff --git a/examples/tgt-acquire.py b/examples/tgt-acquire.py
new file mode 100644
index 0000000..cc8dc28
--- /dev/null
+++ b/examples/tgt-acquire.py
@@ -0,0 +1,8 @@
+import dbus
+
+bus = dbus.SessionBus()
+ka = bus.get_object('org.gnome.KrbAuthDialog',
+                    '/org/gnome/KrbAuthDialog')
+ret = ka.acquireTgt("", dbus_interface='org.gnome.KrbAuthDialog')
+if not ret:
+    print >>sys.stderr, "Cannot acuire TGT, aborting."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]