feat: define administrator auth contracts

This commit is contained in:
2026-10-25 04:22:32 +01:00
parent d555bc0727
commit d5a4027708
6 changed files with 44 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.invalid/contracts/v1/auth-login-request.json",
"title": "Trixie Login Request",
"type": "object",
"additionalProperties": false,
"required": ["username", "password"],
"properties": {
"username": { "type": "string", "minLength": 1 },
"password": { "type": "string", "minLength": 1 }
}
}
+12
View File
@@ -0,0 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.invalid/contracts/v1/auth-login-response.json",
"title": "Trixie Login Response",
"type": "object",
"additionalProperties": false,
"required": ["session_token", "must_replace_credentials"],
"properties": {
"session_token": { "type": "string", "minLength": 1 },
"must_replace_credentials": { "type": "boolean" }
}
}
+11
View File
@@ -0,0 +1,11 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://trixie.invalid/contracts/v1/auth-session-response.json",
"title": "Trixie Session Response",
"type": "object",
"additionalProperties": false,
"required": ["authenticated"],
"properties": {
"authenticated": { "const": true }
}
}