mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
Cleanup: remove env dependency
This commit is contained in:
parent
d100a790a0
commit
9e63ec62fb
@ -12,7 +12,7 @@ class KeyAuthService:
|
|||||||
requests. The key is passed as the username field in the standard HTTP
|
requests. The key is passed as the username field in the standard HTTP
|
||||||
Basic Auth header.
|
Basic Auth header.
|
||||||
"""
|
"""
|
||||||
def __init__(self, env):
|
def __init__(self):
|
||||||
self.auth_realm = DEFAULT_AUTH_REALM
|
self.auth_realm = DEFAULT_AUTH_REALM
|
||||||
self.key = self._generate_key()
|
self.key = self._generate_key()
|
||||||
self.key_path = DEFAULT_KEY_PATH
|
self.key_path = DEFAULT_KEY_PATH
|
||||||
|
@ -10,7 +10,7 @@ from mailconfig import get_mail_users, add_mail_user, set_mail_password, remove_
|
|||||||
|
|
||||||
env = utils.load_environment()
|
env = utils.load_environment()
|
||||||
|
|
||||||
auth_service = auth.KeyAuthService(env)
|
auth_service = auth.KeyAuthService()
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def require_auth_key():
|
def require_auth_key():
|
||||||
|
Loading…
Reference in New Issue
Block a user