Files
nginx-proxy-manager/backend/schema/paths/tokens/post.json
Jamie Curnow 462c134751 2fa work slight refactor
- use existing access mechanisms for validation
- adds swagger/schema and validation of incoming payload
2026-01-14 11:45:12 +10:00

68 lines
1.3 KiB
JSON

{
"operationId": "requestToken",
"summary": "Request a new access token from credentials",
"tags": ["tokens"],
"requestBody": {
"description": "Credentials Payload",
"required": true,
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"identity": {
"minLength": 1,
"type": "string",
"example": "me@example.com"
},
"scope": {
"minLength": 1,
"type": "string",
"enum": ["user"],
"example": "user"
},
"secret": {
"minLength": 1,
"type": "string",
"example": "bigredhorsebanana"
}
},
"required": ["identity", "secret"],
"type": "object"
},
"example": {
"identity": "me@example.com",
"secret": "bigredhorsebanana"
}
}
}
},
"responses": {
"200": {
"content": {
"application/json": {
"examples": {
"default": {
"value": {
"expires": "2025-02-04T20:40:46.340Z",
"token": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
}
}
},
"schema": {
"oneOf": [
{
"$ref": "../../components/token-object.json"
},
{
"$ref": "../../components/token-challenge.json"
}
]
}
}
},
"description": "200 response"
}
}
}