summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@gmail.com>2015-12-05 16:46:35 +0000
committerMichaël Ball <michael.ball@gmail.com>2015-12-05 16:46:35 +0000
commit98a61bb09ccacab827d8b0091bdf8ac6f464dacb (patch)
tree76a329d775cc9d0589cf8f84e3211f60cc07b3a9 /common
parent3dc5f811def121a48c17bdb3bb419e5108675e04 (diff)
parente9749a150cfe8c0548cb78380aba9ab2e4730984 (diff)
Support token authentication
Diffstat (limited to 'common')
-rw-r--r--common/security.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/security.py b/common/security.py
index af1e8b9..91acb2b 100644
--- a/common/security.py
+++ b/common/security.py
@@ -1,6 +1,13 @@
+import configparser
+
from passlib.context import CryptContext
+config = configparser.ConfigParser()
+config.read("mach2.ini")
+
+secret_key = config["DEFAULT"]["secret_key"]
+
pwd_context = CryptContext(
schemes=["pbkdf2_sha256", "des_crypt"],
default="pbkdf2_sha256",