mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
Add TOTP header to Swagger Documentation (#12402)
This commit is contained in:
parent
15300699c4
commit
7b260acd7b
2 changed files with 15 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
||||||
// - AuthorizationHeaderToken :
|
// - AuthorizationHeaderToken :
|
||||||
// - SudoParam :
|
// - SudoParam :
|
||||||
// - SudoHeader :
|
// - SudoHeader :
|
||||||
|
// - TOTPHeader :
|
||||||
//
|
//
|
||||||
// SecurityDefinitions:
|
// SecurityDefinitions:
|
||||||
// BasicAuth:
|
// BasicAuth:
|
||||||
|
@ -54,6 +55,11 @@
|
||||||
// name: Sudo
|
// name: Sudo
|
||||||
// in: header
|
// in: header
|
||||||
// description: Sudo API request as the user provided as the key. Admin privileges are required.
|
// description: Sudo API request as the user provided as the key. Admin privileges are required.
|
||||||
|
// TOTPHeader:
|
||||||
|
// type: apiKey
|
||||||
|
// name: X-GITEA-OTP
|
||||||
|
// in: header
|
||||||
|
// description: Must be used in combination with BasicAuth if two-factor authentication is enabled.
|
||||||
//
|
//
|
||||||
// swagger:meta
|
// swagger:meta
|
||||||
package v1
|
package v1
|
||||||
|
|
|
@ -15551,6 +15551,12 @@
|
||||||
"name": "sudo",
|
"name": "sudo",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
|
"TOTPHeader": {
|
||||||
|
"description": "Must be used in combination with BasicAuth if two-factor authentication is enabled.",
|
||||||
|
"type": "apiKey",
|
||||||
|
"name": "X-GITEA-OTP",
|
||||||
|
"in": "header"
|
||||||
|
},
|
||||||
"Token": {
|
"Token": {
|
||||||
"type": "apiKey",
|
"type": "apiKey",
|
||||||
"name": "token",
|
"name": "token",
|
||||||
|
@ -15575,6 +15581,9 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"SudoHeader": []
|
"SudoHeader": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"TOTPHeader": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue