| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- {
- "operationId": "loginAsUser",
- "summary": "Login as this user",
- "tags": ["users"],
- "security": [
- {
- "bearerAuth": ["admin"]
- }
- ],
- "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": "[email protected]",
- "name": "John Doe",
- "nickname": "Jonny",
- "avatar": "//www.gravatar.com/avatar/3c8d73f45fd8763f827b964c76e6032a?default=mm",
- "roles": []
- }
- }
- }
- },
- "schema": {
- "type": "object",
- "description": "Login object",
- "required": ["expires", "token", "user"],
- "additionalProperties": false,
- "properties": {
- "token": {
- "description": "JWT Token",
- "type": "string",
- "example": "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.ey...xaHKYr3Kk6MvkUjcC4"
- },
- "expires": {
- "description": "Token Expiry Timestamp",
- "type": "string",
- "example": "2020-01-30T10:43:44.000Z"
- },
- "user": {
- "$ref": "../../../../components/user-object.json"
- }
- }
- }
- }
- }
- }
- }
- }
|