feat(web,server): manage authorized devices (#2329)

* feat: manage authorized devices

* chore: open api

* get header from mobile app

* write header from mobile app

* styling

* fix unit test

* feat: use relative time

* feat: update access time

* fix: tests

* chore: confirm wording

* chore: bump test coverage thresholds

* feat: add some icons

* chore: icon tweaks

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen
2023-04-25 22:19:23 -04:00
committed by GitHub
parent aa91b946fa
commit b8313abfa8
41 changed files with 1209 additions and 93 deletions

View File

@@ -339,6 +339,70 @@
]
}
},
"/auth/devices": {
"get": {
"operationId": "getAuthDevices",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AuthDeviceResponseDto"
}
}
}
}
}
},
"tags": [
"Authentication"
],
"security": [
{
"bearer": []
},
{
"cookie": []
}
]
}
},
"/auth/devices/{id}": {
"delete": {
"operationId": "logoutAuthDevice",
"parameters": [
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"Authentication"
],
"security": [
{
"bearer": []
},
{
"cookie": []
}
]
}
},
"/auth/validateToken": {
"post": {
"operationId": "validateAccessToken",
@@ -3986,6 +4050,37 @@
"createdAt"
]
},
"AuthDeviceResponseDto": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"current": {
"type": "boolean"
},
"deviceType": {
"type": "string"
},
"deviceOS": {
"type": "string"
}
},
"required": [
"id",
"createdAt",
"updatedAt",
"current",
"deviceType",
"deviceOS"
]
},
"ValidateAccessTokenResponseDto": {
"type": "object",
"properties": {
@@ -4018,12 +4113,10 @@
"type": "object",
"properties": {
"successful": {
"type": "boolean",
"readOnly": true
"type": "boolean"
},
"redirectUri": {
"type": "string",
"readOnly": true
"type": "string"
}
},
"required": [