[icinga-checkins] icinga.org: icingaweb2-module-director/master: CoreApi: new getTicketSalt( ) method

git at icinga.org git at icinga.org
Fri Feb 5 16:30:12 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: d709ebc05f1c29a16601d2a1dec9c811e81b5c33
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=d709ebc05f1c29a16601d2a1dec9c811e81b5c33

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Feb  5 16:29:53 2016 +0100

CoreApi: new getTicketSalt() method

---

 library/Director/Core/CoreApi.php |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/library/Director/Core/CoreApi.php b/library/Director/Core/CoreApi.php
index 1f43299..5d3fe11 100644
--- a/library/Director/Core/CoreApi.php
+++ b/library/Director/Core/CoreApi.php
@@ -66,6 +66,17 @@ class CoreApi
         return $res[$name];
     }
 
+    public function getTicketSalt()
+    {
+        // TODO: api must not be the name!
+        $api = $this->getObject('api', 'ApiListeners', array('ticket_salt'));
+        if (isset($api->attrs->ticket_salt)) {
+            return $api->attrs->ticket_salt;
+        }
+
+        return null;
+    }
+
     public function getConstants()
     {
         $constants = array();



More information about the icinga-checkins mailing list