summaryrefslogtreecommitdiff
path: root/animism-align/cli/app/settings/app_cfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/cli/app/settings/app_cfg.py')
-rw-r--r--animism-align/cli/app/settings/app_cfg.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/animism-align/cli/app/settings/app_cfg.py b/animism-align/cli/app/settings/app_cfg.py
index dfd0154..ceb9e43 100644
--- a/animism-align/cli/app/settings/app_cfg.py
+++ b/animism-align/cli/app/settings/app_cfg.py
@@ -33,6 +33,7 @@ load_dotenv(dotenv_path=fp_env)
CLICK_GROUPS = {
'peaks': 'commands/peaks',
'site': 'commands/site',
+ 'admin': 'commands/admin',
'db': '',
'flask': '',
'viewer': '',
@@ -84,6 +85,19 @@ except Exception as e:
pass
# -----------------------------------------------------------------------------
+# Le crypto
+# -----------------------------------------------------------------------------
+
+TOKEN_SECRET = os.getenv("TOKEN_SECRET") or None
+if TOKEN_SECRET is None:
+ import random
+ raise ValueError("Please set a token secret, e.g. " + hex(random.getrandbits(64 * 8)).replace('0x',''))
+
+TOKEN_SECRET_BYTES = bytearray()
+TOKEN_SECRET_BYTES.extend(map(ord, TOKEN_SECRET))
+
+
+# -----------------------------------------------------------------------------
# Exports
# -----------------------------------------------------------------------------