Identify sessions by session key - a hash that can be safely shared.
This commit is contained in:
+3
-3
@@ -1300,7 +1300,7 @@ class TestAdminSessions:
|
||||
)
|
||||
|
||||
response = await client.delete(
|
||||
f"/auth/api/admin/users/{test_user.uuid}/sessions/{base64url.enc(extra_db_key)}",
|
||||
f"/auth/api/admin/users/{test_user.uuid}/sessions/{extra_db_key}",
|
||||
headers={**auth_headers(session_token), "Host": "localhost:4401"},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
@@ -1364,9 +1364,9 @@ class TestAdminSessions:
|
||||
f"/auth/api/admin/users/{test_user.uuid}/sessions/invalid!!id",
|
||||
headers={**auth_headers(session_token), "Host": "localhost:4401"},
|
||||
)
|
||||
assert response.status_code == 400
|
||||
assert response.status_code == 404
|
||||
data = response.json()
|
||||
assert "Invalid session ID format" in data["detail"]
|
||||
assert "Session not found" in data["detail"]
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_delete_session_not_found(
|
||||
|
||||
Reference in New Issue
Block a user