mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-02-25 14:19:47 +00:00
feat: (more) secure cookies
This commit is contained in:
@@ -23,7 +23,7 @@ def test_security() -> None:
|
||||
must generate security definitions for swagger
|
||||
"""
|
||||
token = next(iter(_security()))["token"]
|
||||
assert token == {"type": "apiKey", "name": "API_SESSION", "in": "cookie"}
|
||||
assert token == {"type": "apiKey", "name": "AHRIMAN", "in": "cookie"}
|
||||
|
||||
|
||||
def test_servers(application: Application) -> None:
|
||||
|
||||
@@ -6,4 +6,4 @@ def test_schema() -> None:
|
||||
must return valid schema
|
||||
"""
|
||||
schema = AuthSchema()
|
||||
assert not schema.validate({"API_SESSION": "key"})
|
||||
assert not schema.validate({"AHRIMAN": "key"})
|
||||
|
||||
@@ -27,7 +27,7 @@ def _client(client: TestClient, mocker: MockerFixture) -> TestClient:
|
||||
"parameters": [
|
||||
{
|
||||
"in": "cookie",
|
||||
"name": "API_SESSION",
|
||||
"name": "AHRIMAN",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
},
|
||||
@@ -39,7 +39,7 @@ def _client(client: TestClient, mocker: MockerFixture) -> TestClient:
|
||||
"parameters": [
|
||||
{
|
||||
"in": "cookie",
|
||||
"name": "API_SESSION",
|
||||
"name": "AHRIMAN",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
},
|
||||
@@ -60,7 +60,7 @@ def _client(client: TestClient, mocker: MockerFixture) -> TestClient:
|
||||
{
|
||||
"token": {
|
||||
"type": "apiKey",
|
||||
"name": "API_SESSION",
|
||||
"name": "AHRIMAN",
|
||||
"in": "cookie",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user