feat: define administrator auth contracts
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
@@ -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" }
|
||||
}
|
||||
}
|
||||
@@ -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 }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user