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
+2 -1
View File
@@ -7,5 +7,6 @@ This repository contains schemas, shared enums, error codes, compatibility fixtu
The first contract slice is under `contracts/v1/` and `fixtures/v1/`. It covers The first contract slice is under `contracts/v1/` and `fixtures/v1/`. It covers
server readiness, health, errors, and the transport-neutral realtime event server readiness, health, errors, and the transport-neutral realtime event
envelope so the client and server can be developed and tested together before envelope so the client and server can be developed and tested together before
Twitch integration. Twitch integration. It also defines the first administrator authentication
request and response envelopes; bearer values in fixtures are synthetic only.
+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 }
}
}
+4
View File
@@ -0,0 +1,4 @@
{
"session_token": "fixture-session-token-never-use",
"must_replace_credentials": true
}
@@ -0,0 +1,3 @@
{
"authenticated": true
}