feat(server,web): migrate oauth settings from env to system config (#1061)

This commit is contained in:
Jason Rasmussen
2022-12-09 15:51:42 -05:00
committed by GitHub
parent cefdd86b7f
commit 5e680551b9
69 changed files with 2079 additions and 1229 deletions

View File

@@ -2086,7 +2086,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemConfigResponseDto"
"$ref": "#/components/schemas/SystemConfigDto"
}
}
}
@@ -2109,7 +2109,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateSystemConfigDto"
"$ref": "#/components/schemas/SystemConfigDto"
}
}
}
@@ -2120,7 +2120,33 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemConfigResponseDto"
"$ref": "#/components/schemas/SystemConfigDto"
}
}
}
}
},
"tags": [
"System Config"
],
"security": [
{
"bearer": []
}
]
}
},
"/system-config/defaults": {
"get": {
"operationId": "getDefaults",
"parameters": [],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SystemConfigDto"
}
}
}
@@ -3568,56 +3594,82 @@
"command"
]
},
"SystemConfigKey": {
"type": "string",
"enum": [
"ffmpeg_crf",
"ffmpeg_preset",
"ffmpeg_target_video_codec",
"ffmpeg_target_audio_codec",
"ffmpeg_target_scaling"
]
},
"SystemConfigResponseItem": {
"SystemConfigFFmpegDto": {
"type": "object",
"properties": {
"name": {
"crf": {
"type": "string"
},
"key": {
"$ref": "#/components/schemas/SystemConfigKey"
},
"value": {
"preset": {
"type": "string"
},
"defaultValue": {
"targetVideoCodec": {
"type": "string"
},
"targetAudioCodec": {
"type": "string"
},
"targetScaling": {
"type": "string"
}
},
"required": [
"name",
"key",
"value",
"defaultValue"
"crf",
"preset",
"targetVideoCodec",
"targetAudioCodec",
"targetScaling"
]
},
"SystemConfigResponseDto": {
"SystemConfigOAuthDto": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SystemConfigResponseItem"
}
"enabled": {
"type": "boolean"
},
"issuerUrl": {
"type": "string"
},
"clientId": {
"type": "string"
},
"clientSecret": {
"type": "string"
},
"scope": {
"type": "string"
},
"buttonText": {
"type": "string"
},
"autoRegister": {
"type": "boolean"
}
},
"required": [
"config"
"enabled",
"issuerUrl",
"clientId",
"clientSecret",
"scope",
"buttonText",
"autoRegister"
]
},
"UpdateSystemConfigDto": {
"SystemConfigDto": {
"type": "object",
"properties": {}
"properties": {
"ffmpeg": {
"$ref": "#/components/schemas/SystemConfigFFmpegDto"
},
"oauth": {
"$ref": "#/components/schemas/SystemConfigOAuthDto"
}
},
"required": [
"ffmpeg",
"oauth"
]
}
}
}