lories.application.view.login.authentication ============================================ .. py:module:: lories.application.view.login.authentication .. autoapi-nested-parse:: lories.application.view.login.authentication ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Exceptions ---------- .. autoapisummary:: lories.application.view.login.authentication.AuthenticationException Classes ------- .. autoapisummary:: lories.application.view.login.authentication.Authentication Functions --------- .. autoapisummary:: lories.application.view.login.authentication.get_random_string Module Contents --------------- .. py:exception:: AuthenticationException(reason: str) Bases: :py:obj:`lories.application.interface.InterfaceException` .. autoapi-inheritance-diagram:: lories.application.view.login.authentication.AuthenticationException :parts: 1 :private-bases: Raise if an error occurred authenticating a session or user. Initialize self. See help(type(self)) for accurate signature. .. py:class:: Authentication(app: dash.Dash, configs: lories.core.Configurations, login_route: str = 'auth', public_routes: Optional[list] = None, secret_key: str = None) Bases: :py:obj:`lories.core.Configurator`, :py:obj:`dash_auth.auth.Auth` .. autoapi-inheritance-diagram:: lories.application.view.login.authentication.Authentication :parts: 1 :private-bases: Helper class that provides a standard way to create an ABC using inheritance. .. py:function:: get_random_string(length, allowed_chars=RANDOM_STRING_CHARS) Return a securely generated random string. The bit length of the returned value can be calculated with the formula: log_2(len(allowed_chars)^length) For example, with default `allowed_chars` (26+26+10), this gives: * length: 12, bit length =~ 71 bits * length: 22, bit length =~ 131 bits