From e9749a150cfe8c0548cb78380aba9ab2e4730984 Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Sat, 5 Dec 2015 12:26:19 +0000 Subject: Support api key authentication --- common/security.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common') 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", -- cgit v1.2.3