summaryrefslogtreecommitdiff
path: root/MANIFEST.in
diff options
context:
space:
mode:
authorSolly Ross <sross@redhat.com>2015-03-26 16:01:57 -0400
committerSolly Ross <sross@redhat.com>2015-03-26 16:21:25 -0400
commit69a8b928aa2c283beeb47c4611ea365f231840ec (patch)
treed258a585ddbb9ae4be784133bd606be3ccab8d63 /MANIFEST.in
parent23045cb212a26bb41ca8894609239fb162540097 (diff)
downloadwebsockify-feature/token-plugins.tar.gz
Introduce Token Pluginsfeature/token-plugins
Token plugins provide a generic interface for transforming a token into a `(host, port)` tuple. The plugin name is specified using the '--token-plugin' option, and may either be the name of a class from `websockify.token_plugins`, or a fully qualified python path to the token plugin class (see below). An optional plugin parameter can be specified using the '--token-source' option (a value of `None` will be used if no '--token-source' option is passed). Token plugins should inherit from `websockify.token_plugins.BasePlugin`, and should implement the `lookup(token)` method. The value of the '--token-source' option is available as `self.source`. Several plugins are included by default. The `ReadOnlyTokenFile` and `TokenFile` plugins implement functionality from '--target-config' (with the former only reading the file(s) once, and the latter reading them every time). The 'BaseTokenAPI' plugin fetches the value from an API, returning the result of `process_result(response_object)`. By default, `process_result` simply returns the text of the response, but may be overriden. The `JSONTokenAPI` does just this, returning the 'host' and 'port' values from the response JSON object. The old '--target-config' option is now deprecated, and maps to the `TokenFile` plugin under the hood. Also-Authored-By: James Portman (@james-portman) Closes #157
Diffstat (limited to 'MANIFEST.in')
0 files changed, 0 insertions, 0 deletions