DAQ: Custom JWT key must be used
This commit is contained in:
1 parent
b20609089c
commit
59ba7224b9
1 file changed
+5
-1
@@ -11,7 +11,11 @@ from pydantic import BaseModel
|
||||
|
||||
from aaredaq.config import BeamlineConfig
|
||||
|
||||
SECRET_KEY = "secret_key_not_for_production"
|
||||
if os.environ.get("JWT_AAREDAQ_KEY") is None:
|
||||
raise Exception("JWT_AAREDAQ_KEY environment variable not set, cannot guarantee safe authentication.")
|
||||
|
||||
SECRET_KEY = os.environ.get("JWT_AAREDAQ_KEY")
|
||||
|
||||
ALGORITHM = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES = 24 * 60 * 7 # 1 week
|
||||
SESSION_EXPIRE_SECONDS = 60 * 10
|
||||
|
||||
Reference in new issue
Block a user