[Docs] Documented AppPlugins

This commit is contained in:
Gina Häußge 2015-03-23 18:15:18 +01:00
parent 7bf1627625
commit 97c8c7826c

View file

@ -1058,6 +1058,28 @@ class ProgressPlugin(OctoPrintPlugin):
class AppPlugin(OctoPrintPlugin):
"""
Using the :class:`AppPlugin mixin` plugins may register additional :ref:`App session key providers <sec-api-apps-sessionkey>`
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 []