diff options
author | Michaël Ball <michael.ball@gmail.com> | 2015-12-05 12:26:19 +0000 |
---|---|---|
committer | Michaël Ball <michael.ball@gmail.com> | 2015-12-05 16:45:34 +0000 |
commit | e9749a150cfe8c0548cb78380aba9ab2e4730984 (patch) | |
tree | 76a329d775cc9d0589cf8f84e3211f60cc07b3a9 /common/security.py | |
parent | 3dc5f811def121a48c17bdb3bb419e5108675e04 (diff) |
Support api key authentication
Diffstat (limited to 'common/security.py')
-rw-r--r-- | common/security.py | 7 |
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", |