mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-17 01:43:35 +00:00
74 lines
1.6 KiB
JSON
74 lines
1.6 KiB
JSON
{
|
|
"operationId": "loginAsUser",
|
|
"summary": "Login as this user",
|
|
"tags": ["Users"],
|
|
"security": [
|
|
{
|
|
"BearerAuth": ["users"]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "userID",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"required": true,
|
|
"description": "User ID",
|
|
"example": 2
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "200 response",
|
|
"content": {
|
|
"application/json": {
|
|
"examples": {
|
|
"default": {
|
|
"value": {
|
|
"token": "eyJhbGciOiJSUzI1NiIsInR...16OjT8B3NLyXg",
|
|
"expires": "2020-01-31T10:56:23.239Z",
|
|
"user": {
|
|
"id": 1,
|
|
"created_on": "2020-01-30T10:43:44.000Z",
|
|
"modified_on": "2020-01-30T10:43:44.000Z",
|
|
"is_disabled": false,
|
|
"email": "jc@jc21.com",
|
|
"name": "Jamie Curnow",
|
|
"nickname": "James",
|
|
"avatar": "//www.gravatar.com/avatar/3c8d73f45fd8763f827b964c76e6032a?default=mm",
|
|
"roles": ["admin"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"schema": {
|
|
"type": "object",
|
|
"description": "Login object",
|
|
"required": ["expires", "token", "user"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"expires": {
|
|
"description": "Token Expiry Unix Time",
|
|
"example": 1566540249,
|
|
"minimum": 1,
|
|
"type": "number"
|
|
},
|
|
"token": {
|
|
"description": "JWT Token",
|
|
"example": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4",
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"$ref": "../../../../components/user-object.json"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|