We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb41869 commit a96ce9fCopy full SHA for a96ce9f
monkey/monkey_island/cc/app.py
@@ -54,6 +54,7 @@
54
from monkey_island.cc.setup.mongo.mongo_setup import MONGO_DB_HOST, MONGO_DB_NAME, MONGO_DB_PORT
55
56
HOME_FILE = "index.html"
57
+AUTH_EXPIRATION_TIME = 30 * 60 # 30 minutes authentication token expiration time
58
59
60
def serve_static_file(static_path):
@@ -94,6 +95,8 @@ def setup_authentication(app, data_dir):
94
95
app.config["SECURITY_USERNAME_REQUIRED"] = True
96
app.config["SECURITY_REGISTERABLE"] = True
97
app.config["SECURITY_SEND_REGISTER_EMAIL"] = False
98
+
99
+ app.config["SECURITY_TOKEN_MAX_AGE"] = AUTH_EXPIRATION_TIME
100
# Ignore CSRF, because it's irrelevant for javascript applications
101
app.config["WTF_CSRF_CHECK_DEFAULT"] = False
102
app.config["SECURITY_CSRF_IGNORE_UNAUTH_ENDPOINTS"] = True
0 commit comments