aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-07 14:53:30 +0200
committerChocobozzz <me@florianbigard.com>2022-10-07 14:53:30 +0200
commita69ea13086273fc6659c153be93f0f5b37aad733 (patch)
treea40f5ec0d55cb8208fdaa2bfa8f919e482bc7f3e
parent2166c058f34dff6f91566930d12448805d829de7 (diff)
downloadPeerTube-a69ea13086273fc6659c153be93f0f5b37aad733.tar.gz
PeerTube-a69ea13086273fc6659c153be93f0f5b37aad733.tar.zst
PeerTube-a69ea13086273fc6659c153be93f0f5b37aad733.zip
Add open api doc for two factor auth
-rw-r--r--support/doc/api/openapi.yaml106
1 files changed, 106 insertions, 0 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index c62310b76..2fb154dbd 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1126,6 +1126,97 @@ paths:
1126 '404': 1126 '404':
1127 description: user not found 1127 description: user not found
1128 1128
1129 /users/{id}/two-factor/request:
1130 post:
1131 summary: Request two factor auth
1132 operationId: requestTwoFactor
1133 description: Request two factor authentication for a user
1134 tags:
1135 - Users
1136 parameters:
1137 - $ref: '#/components/parameters/id'
1138 requestBody:
1139 content:
1140 application/json:
1141 schema:
1142 type: object
1143 properties:
1144 currentPassword:
1145 type: string
1146 description: Password of the currently authenticated user
1147 responses:
1148 '200':
1149 description: successful operation
1150 content:
1151 application/json:
1152 schema:
1153 type: array
1154 items:
1155 $ref: '#/components/schemas/RequestTwoFactorResponse'
1156 '403':
1157 description: invalid password
1158 '404':
1159 description: user not found
1160
1161 /users/{id}/two-factor/confirm-request:
1162 post:
1163 summary: Confirm two factor auth
1164 operationId: confirmTwoFactorRequest
1165 description: Confirm a two factor authentication request
1166 tags:
1167 - Users
1168 parameters:
1169 - $ref: '#/components/parameters/id'
1170 requestBody:
1171 content:
1172 application/json:
1173 schema:
1174 type: object
1175 properties:
1176 requestToken:
1177 type: string
1178 description: Token to identify the two factor request
1179 otpToken:
1180 type: string
1181 description: OTP token generated by the app
1182 required:
1183 - requestToken
1184 - otpToken
1185 responses:
1186 '204':
1187 description: successful operation
1188 '403':
1189 description: invalid request token or OTP token
1190 '404':
1191 description: user not found
1192
1193 /users/{id}/two-factor/disable:
1194 post:
1195 summary: Disable two factor auth
1196 operationId: disableTwoFactor
1197 description: Disable two factor authentication of a user
1198 tags:
1199 - Users
1200 parameters:
1201 - $ref: '#/components/parameters/id'
1202 requestBody:
1203 content:
1204 application/json:
1205 schema:
1206 type: object
1207 properties:
1208 currentPassword:
1209 type: string
1210 description: Password of the currently authenticated user
1211 responses:
1212 '204':
1213 description: successful operation
1214 '403':
1215 description: invalid password
1216 '404':
1217 description: user not found
1218
1219
1129 /users/ask-send-verify-email: 1220 /users/ask-send-verify-email:
1130 post: 1221 post:
1131 summary: Resend user verification link 1222 summary: Resend user verification link
@@ -8146,6 +8237,21 @@ components:
8146 description: User can select live latency mode if enabled by the instance 8237 description: User can select live latency mode if enabled by the instance
8147 $ref: '#/components/schemas/LiveVideoLatencyMode' 8238 $ref: '#/components/schemas/LiveVideoLatencyMode'
8148 8239
8240 RequestTwoFactorResponse:
8241 properties:
8242 otpRequest:
8243 type: object
8244 properties:
8245 requestToken:
8246 type: string
8247 description: The token to send to confirm this request
8248 secret:
8249 type: string
8250 description: The OTP secret
8251 uri:
8252 type: string
8253 description: The OTP URI
8254
8149 VideoStudioCreateTask: 8255 VideoStudioCreateTask:
8150 type: array 8256 type: array
8151 items: 8257 items: