univention.admin.rest.server package#

class univention.admin.rest.server.Gateway(application: Application, request: HTTPServerRequest, **kwargs: Any)[source]#

Bases: RequestHandler

A server which acts as proxy to multiple processes in different languages

TODO: Implement authentication via PAM TODO: Implement ACL handling (restriction on certain paths for certain users/groups) TODO: Implement a SAML service provider TODO: Implement management of modules

child_id = None#
PROCESSES = {}#
SOCKETS = {}#
set_default_headers()[source]#

Override this to set HTTP headers at the beginning of the request.

For example, this is the place to set a custom Server header. Note that setting such headers in the normal flow of request processing may not do what you want, since headers may be reset during error handling.

prepare()[source]#

Called at the beginning of a request before get/post/etc.

Override this method to perform common initialization regardless of the request method.

Asynchronous support: Use async def or decorate this method with .gen.coroutine to make it asynchronous. If this method returns an Awaitable execution will not proceed until the Awaitable is done.

Added in version 3.1: Asynchronous support.

get()[source]#
post()#
put()#
delete()#
patch()#
options()#
select_language()[source]#
classmethod main()[source]#
classmethod start_child(child_id)[source]#
classmethod start_server(socks)[source]#
classmethod log_function(handler)[source]#
classmethod get_locale(language)[source]#
classmethod get_socket_for_locale(language)[source]#
classmethod start_processes(num_processes=1, start_port=9979, debug_level=2)[source]#
classmethod register_signal_handlers()[source]#
classmethod signal_handler_reload(sig, frame)[source]#
classmethod signal_handler_stop(sig, frame)[source]#
classmethod safe_kill(pid, signo)[source]#