authnzerver.handlers module¶
These are handlers for the authnzerver.
-
class
authnzerver.handlers.
AuthHandler
(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs)[source]¶ Bases:
tornado.web.RequestHandler
This handles the actual auth requests.
-
class
authnzerver.handlers.
EchoHandler
(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs)[source]¶ Bases:
tornado.web.RequestHandler
This just echoes back whatever we send.
Useful to see if the encryption is working as intended.
-
class
authnzerver.handlers.
FrontendEncoder
(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]¶ Bases:
json.encoder.JSONEncoder
-
default
(obj)[source]¶ Implement this method in a subclass such that it returns a serializable object for
o
, or calls the base implementation (to raise aTypeError
).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o)
-
-
authnzerver.handlers.
check_host
(remote_ip)[source]¶ This just returns False if the remote_ip != 127.0.0.1