mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-11 01:27:17 +00:00
read the key into the auth object
This commit is contained in:
parent
ec1641e6a5
commit
8fdd11d4c6
@ -36,6 +36,8 @@ class AuthService:
|
|||||||
|
|
||||||
# with create_file_with_mode(self.key_path, 0o640) as key_file:
|
# with create_file_with_mode(self.key_path, 0o640) as key_file:
|
||||||
# key_file.write(self.key + '\n')
|
# key_file.write(self.key + '\n')
|
||||||
|
with open(self.key_path, 'r') as file:
|
||||||
|
self.key = file.read()
|
||||||
|
|
||||||
def authenticate(self, request, env, login_only=False, logout=False):
|
def authenticate(self, request, env, login_only=False, logout=False):
|
||||||
"""Test if the HTTP Authorization header's username matches the system key, a session key,
|
"""Test if the HTTP Authorization header's username matches the system key, a session key,
|
||||||
|
Loading…
Reference in New Issue
Block a user