Skip to content

Commit 7e1c586

Browse files
committed
Auth url has moved to security configuration
1 parent 1cf01e7 commit 7e1c586

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/murfey/server/api/auth.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import os
43
import secrets
54
import time
65
from logging import getLogger
@@ -19,7 +18,7 @@
1918

2019
from murfey.server import sanitise
2120
from murfey.server.murfey_db import murfey_db, url
22-
from murfey.util.config import get_machine_config, get_security_config
21+
from murfey.util.config import get_security_config
2322
from murfey.util.db import MurfeyUser as User
2423
from murfey.util.db import Session as MurfeySession
2524

@@ -64,12 +63,7 @@ async def __call__(self, request: Request):
6463

6564
# Set up variables used for authentication
6665
security_config = get_security_config()
67-
machine_config = get_machine_config()
68-
auth_url = (
69-
machine_config[os.getenv("BEAMLINE", "")].auth_url
70-
if machine_config.get(os.getenv("BEAMLINE", ""))
71-
else ""
72-
)
66+
auth_url = security_config.auth_url
7367
ALGORITHM = security_config.auth_algorithm or "HS256"
7468
SECRET_KEY = security_config.auth_key or secrets.token_hex(32)
7569
if security_config.auth_type == "password":

0 commit comments

Comments
 (0)