mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-25 02:00:35 -06:00
Add open api doc for two factor auth
This commit is contained in:
parent
2166c058f3
commit
a69ea13086
@ -1126,6 +1126,97 @@ paths:
|
||||
'404':
|
||||
description: user not found
|
||||
|
||||
/users/{id}/two-factor/request:
|
||||
post:
|
||||
summary: Request two factor auth
|
||||
operationId: requestTwoFactor
|
||||
description: Request two factor authentication for a user
|
||||
tags:
|
||||
- Users
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/id'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
currentPassword:
|
||||
type: string
|
||||
description: Password of the currently authenticated user
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/RequestTwoFactorResponse'
|
||||
'403':
|
||||
description: invalid password
|
||||
'404':
|
||||
description: user not found
|
||||
|
||||
/users/{id}/two-factor/confirm-request:
|
||||
post:
|
||||
summary: Confirm two factor auth
|
||||
operationId: confirmTwoFactorRequest
|
||||
description: Confirm a two factor authentication request
|
||||
tags:
|
||||
- Users
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/id'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
requestToken:
|
||||
type: string
|
||||
description: Token to identify the two factor request
|
||||
otpToken:
|
||||
type: string
|
||||
description: OTP token generated by the app
|
||||
required:
|
||||
- requestToken
|
||||
- otpToken
|
||||
responses:
|
||||
'204':
|
||||
description: successful operation
|
||||
'403':
|
||||
description: invalid request token or OTP token
|
||||
'404':
|
||||
description: user not found
|
||||
|
||||
/users/{id}/two-factor/disable:
|
||||
post:
|
||||
summary: Disable two factor auth
|
||||
operationId: disableTwoFactor
|
||||
description: Disable two factor authentication of a user
|
||||
tags:
|
||||
- Users
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/id'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
currentPassword:
|
||||
type: string
|
||||
description: Password of the currently authenticated user
|
||||
responses:
|
||||
'204':
|
||||
description: successful operation
|
||||
'403':
|
||||
description: invalid password
|
||||
'404':
|
||||
description: user not found
|
||||
|
||||
|
||||
/users/ask-send-verify-email:
|
||||
post:
|
||||
summary: Resend user verification link
|
||||
@ -8146,6 +8237,21 @@ components:
|
||||
description: User can select live latency mode if enabled by the instance
|
||||
$ref: '#/components/schemas/LiveVideoLatencyMode'
|
||||
|
||||
RequestTwoFactorResponse:
|
||||
properties:
|
||||
otpRequest:
|
||||
type: object
|
||||
properties:
|
||||
requestToken:
|
||||
type: string
|
||||
description: The token to send to confirm this request
|
||||
secret:
|
||||
type: string
|
||||
description: The OTP secret
|
||||
uri:
|
||||
type: string
|
||||
description: The OTP URI
|
||||
|
||||
VideoStudioCreateTask:
|
||||
type: array
|
||||
items:
|
||||
|
Loading…
Reference in New Issue
Block a user