From 97c8c7826c8427bf6a0274cc7913fd8141aea9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 23 Mar 2015 18:15:18 +0100 Subject: [PATCH] [Docs] Documented AppPlugins --- src/octoprint/plugin/types.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index 561e684b..10092935 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -1058,6 +1058,28 @@ class ProgressPlugin(OctoPrintPlugin): class AppPlugin(OctoPrintPlugin): + """ + Using the :class:`AppPlugin mixin` plugins may register additional :ref:`App session key providers ` + within the system. + """ + def get_additional_apps(self): + """ + Overrides this to return your additional app information to be used for validating app session keys. You'll + need to return a :class:`list` of 3-tuples of the format (id, version, public key). + + The ``id`` should be the (unique) identifier of the app. Using a domain prefix might make sense here, e.g. + ``org.octoprint.example.MyApp``. + + ``version`` should be a string specifying the version of the app for which the public key is valid. You can + provide the string ``any`` here, in which case the provided public key will be valid for all versions of the + app for which no specific public key is defined. + + Finally, the public key is expected to be provided as a PKCS1 string without newlines. + + Returns: + list: A list of 3-tuples as described above. + """ + return []