fix(auth): support token query parameter in RoleChecker for SSE and fallbacks
This commit is contained in:
parent
eb4270b693
commit
af04fd2d6a
1 changed files with 3 additions and 0 deletions
|
|
@ -59,6 +59,9 @@ def get_current_user(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if not token:
|
||||||
|
token = request.query_params.get("token") or request.cookies.get("access_token")
|
||||||
|
|
||||||
if not token:
|
if not token:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue