Skip to content

Commit 9f64b06

Browse files
committed
Allow Murfey TUI tokens to pass for now
1 parent 2ea9beb commit 9f64b06

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/murfey/server/api/auth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,15 @@ async def validate_instrument_token(
175175
if expiry_time := decoded_data.get("expiry_time"):
176176
if expiry_time < time.time():
177177
raise JWTError
178+
# Check that the decoded session corresponds to the visit
178179
elif decoded_data.get("session") is not None:
179-
# Check that the decoded session corresponds to the visit
180180
if not validate_session_against_visit(
181181
decoded_data["session"], decoded_data["visit"]
182182
):
183183
raise JWTError
184+
# Check for Murfey TUI tokens (just a 'user' key)
185+
elif decoded_data.get("user") is not None:
186+
pass
184187
else:
185188
raise JWTError
186189
except JWTError:

0 commit comments

Comments
 (0)