lories.application.view.login.authentication#
Exceptions#
Raise if an error occurred authenticating a session or user. |
Classes#
Helper class that provides a standard way to create an ABC using |
Functions#
|
Return a securely generated random string. |
Module Contents#
- exception lories.application.view.login.authentication.AuthenticationException(reason: str)#
Bases:
lories.application.interface.InterfaceException
Raise if an error occurred authenticating a session or user.
Initialize self. See help(type(self)) for accurate signature.
- class lories.application.view.login.authentication.Authentication(app: dash.Dash, configs: lories.core.Configurations, login_route: str = 'auth', public_routes: list | None = None, secret_key: str = None)#
Bases:
lories.core.Configurator,dash_auth.auth.Auth
Helper class that provides a standard way to create an ABC using inheritance.
- lories.application.view.login.authentication.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